Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
worker: do 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