Skip to content

Commit 7a9560f

Browse files
committed
fix timeout
1 parent a8ab865 commit 7a9560f

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

lib/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ version = "1.8.4"
99

1010

1111
dependencies {
12-
implementation(kotlin("stdlib-jdk8"))
13-
1412
// Logging
1513
api("org.slf4j:slf4j-api:1.7.36")
1614

lib/src/main/kotlin/org/veupathdb/lib/compute/platform/intern/queues/QueueWrapper.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,12 @@ internal class QueueWrapper(conf: AsyncQueueConfig) {
9999
PlatformJobResultStatus.Failure -> handler.sendError(ErrorNotification(job.jobID, 1))
100100
PlatformJobResultStatus.Aborted -> { /* Job was aborted, send no notifications. */ }
101101
}
102+
} catch (e: InterruptedException) {
103+
Log.error("job execution for ${job.jobID} was interrupted; likely timed out", e)
104+
handler.sendError(ErrorNotification(jobID = job.jobID, code = 1, message = e.message ?: "job timed out"))
102105
} catch (e: Throwable) {
103106
Log.error("job execution failed with an exception for job ${job.jobID}", e)
104107
handler.sendError(ErrorNotification(jobID = job.jobID, code = 1, message = e.message))
105108
}
106109
}
107-
}
110+
}

lib/src/main/kotlin/org/veupathdb/lib/compute/platform/intern/s3/S3.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ internal object S3 {
162162
val sleepMillis = 1000L
163163
val maxSleeps = 15 // 15 seconds
164164

165-
var sleepCounter = 0
165+
Thread.sleep(sleepMillis)
166+
167+
var sleepCounter = 1
166168

167169
// while MinIO is still reporting that the object exists, sleep on it.
168170
while (obj.exists()) {

0 commit comments

Comments
 (0)