From efa9330d3806ad753f0e5915a8402e68f209ac27 Mon Sep 17 00:00:00 2001 From: Ignacio Heredia Date: Wed, 4 Sep 2024 15:09:24 +0200 Subject: [PATCH] fix: improve task lifecycles Even with this, The UI still throws an error because it is can be launched before the server is _completely_ ready. I'm not sure we can do much more. Just warn the users about it. --- etc/tools/ai4os-cvat/nomad.hcl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/etc/tools/ai4os-cvat/nomad.hcl b/etc/tools/ai4os-cvat/nomad.hcl index 36711e77..98ae11eb 100644 --- a/etc/tools/ai4os-cvat/nomad.hcl +++ b/etc/tools/ai4os-cvat/nomad.hcl @@ -546,10 +546,6 @@ job "tool-cvat-${JOB_UUID}" { } task "main" { - lifecycle { - hook = "poststart" - sidecar = "true" - } driver = "docker" resources { cores = 1 @@ -855,6 +851,12 @@ job "tool-cvat-${JOB_UUID}" { } task "ui" { + + lifecycle { + hook = "poststart" + sidecar = "true" + } + driver = "docker" config { image = "${NOMAD_META_ui_image}:${NOMAD_META_cvat_version}${NOMAD_META_cvat_version_custom}"