From eac88ffc06300e3320151c955e780fd1c6c5ab32 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 10 Jan 2024 10:41:38 +0100 Subject: [PATCH] worker: fix a misleading debug message ... and name of a local variable. The tasks returned by `worker.get_tasks_to_assign()` might not yet be assigned. Closes: https://github.com/release-engineering/kobo/pull/242 --- kobo/worker/taskmanager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kobo/worker/taskmanager.py b/kobo/worker/taskmanager.py index dfe89d73..5fce5e2d 100644 --- a/kobo/worker/taskmanager.py +++ b/kobo/worker/taskmanager.py @@ -306,11 +306,11 @@ def get_next_task(self): return - assigned_task_list = self.hub.worker.get_tasks_to_assign() - self.log_debug("Current assigned tasks: %r" % [ti["id"] for ti in assigned_task_list]) + tasks_to_open = self.hub.worker.get_tasks_to_assign() + self.log_debug("Current tasks to open: %r" % [ti["id"] for ti in tasks_to_open]) - # process assigned tasks first - for task_info in assigned_task_list: + # process tasks that could be transitioned to the OPEN state + for task_info in tasks_to_open: self.take_task(task_info) def take_task(self, task_info):