From 35d956c7bb77c0602d198035b2d73a9c61cb4de4 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 1 May 2018 15:58:55 +0200 Subject: [PATCH] Fix fix for chained tasks Signed-off-by: Clifford Wolf --- sbysrc/sby_core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 6d5cd63..a18687b 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -38,14 +38,14 @@ class SbyTask: self.linebuffer = "" self.logstderr = logstderr + self.job.tasks_pending.append(self) + for dep in self.deps: dep.register_dep(self) self.output_callback = None self.exit_callback = None - self.job.tasks_pending.append(self) - def register_dep(self, next_task): if self.finished: next_task.poll() @@ -179,7 +179,7 @@ class SbyJob: for task in self.tasks_pending: task.poll() - while len(self.tasks_running) or len(self.tasks_pending): + while len(self.tasks_running): fds = [] for task in self.tasks_running: if task.running: -- 2.30.2