From 699d13bbb34649c7e5337b4187cda59b7fa6fd33 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Tue, 14 Jul 2020 23:42:11 +0300 Subject: [PATCH] Fix task status change to queued should also never happen during Task runtime --- trains_agent/commands/worker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trains_agent/commands/worker.py b/trains_agent/commands/worker.py index fd987c2..73ed5e8 100644 --- a/trains_agent/commands/worker.py +++ b/trains_agent/commands/worker.py @@ -104,6 +104,7 @@ log = logging.getLogger(__name__) DOCKER_ROOT_CONF_FILE = "/root/trains.conf" DOCKER_DEFAULT_CONF_FILE = "/root/default_trains.conf" + @attr.s class LiteralScriptManager(object): """ @@ -212,6 +213,7 @@ class TaskStopSignal(object): statuses.stopped, statuses.failed, statuses.published, + statuses.queued, ] default = TaskStopReason.no_stop stopping_message = "stopping" @@ -437,7 +439,7 @@ class Worker(ServiceCommandSection): pass def run_one_task(self, queue, task_id, worker_args, docker=None): - # type: (Text, Text, WorkerParams) -> () + # type: (Text, Text, WorkerParams, Optional[Text]) -> () """ Run one task pulled from queue. :param queue: ID of queue that task was pulled from