Skip to content

Commit

Permalink
Merge pull request #57 from VEuPathDB/missing-in-s3
Browse files Browse the repository at this point in the history
Handle jobs if they're only in postgres, not in S3
  • Loading branch information
dmgaldi authored Mar 8, 2024
2 parents fe20604 + 74270a2 commit af54575
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "org.veupathdb.lib"
version = "1.7.1"
version = "1.7.2"


dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ internal object JobManager {
return s3Job
}

// If job is not in S3, but is in the database, something has gone wrong. Remove the job from the internal DB.
// Otherwise, the job will be stuck indefinitely.
if (lock.withLock { s3Job == null }) {
Log.debug("Job {} is missing in S3 but is present in queue db. Deleting job from queue db to start fresh.")

QueueDB.deleteJob(jobID)
return null
}

// The statuses did align, so we (this service instance) presumably still
// own the job.

Expand Down

0 comments on commit af54575

Please sign in to comment.