-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
worker: do not repeatedly remove already awaited tasks from subtask list
Plain TaskBase.wait() always uses the **whole** list of all subtasks as the set of subtasks that should be awaited. Therefore, it will try to await even tasks that were already awaited in some previous TaskBase.wait() call and are no longer present in self._subtask_list which subsequently raise the ValueError shown below. Keep the set of already awaited tasks and skip their IDs when marking newly awaited subtasks as finished. Fixes the following traceback: ``` Traceback (most recent call last): File "/src/kobo/kobo/worker/taskmanager.py", line 423, in run_task task.run() File "/src/osh/worker/tasks/task_errata_diff_build.py", line 55, in run self.wait() File "/src/kobo/kobo/worker/task.py", line 147, in wait self._subtask_list.remove(i) ValueError: list.remove(x): x not in list ```
- Loading branch information
Showing
2 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters