Skip to content

Commit 7103b71

Browse files
author
alexandre.teilhet
committed
[DL-717] feedback Toom 2
1 parent c9be7c0 commit 7103b71

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

app/org/thp/cortex/util/docker/DockerClient.scala

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,7 @@ class DockerClient(config: Configuration) {
2929
.awaitStatusCode()
3030
logger.info(s"container $containerId started and awaited with code: $waitResult")
3131

32-
0
33-
} recover {
34-
case e =>
35-
logger.error(s"execute container $containerId failed", e)
36-
37-
1
32+
waitResult
3833
}
3934

4035
def prepare(image: String, jobDirectory: Path, jobBaseDirectory: Path, dockerJobBaseDirectory: Path, timeout: FiniteDuration): Try[String] = Try {
@@ -95,9 +90,9 @@ class DockerClient(config: Configuration) {
9590
.pullImageCmd(image)
9691
.start()
9792
.awaitCompletion()
98-
val timeout = config.getOptional[Long]("docker.pullImageTimeout")
93+
val timeout = config.get[FiniteDuration]("docker.pullImageTimeout")
9994

100-
pullImageResultCbk.awaitCompletion(timeout.getOrElse(10000), TimeUnit.MILLISECONDS)
95+
pullImageResultCbk.awaitCompletion(timeout.toMillis, TimeUnit.MILLISECONDS)
10196
}
10297

10398
def clean(containerId: String): Try[Unit] = Try {

conf/application.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ docker {
255255
memorySwappiness = 0
256256
}
257257
autoUpdate = false
258-
pullImageTimeout = 10000
258+
pullImageTimeout = 10 minutes
259259
}
260260

261261
# It's the end my friend. Happy hunting!

0 commit comments

Comments
 (0)