From e618a1591d40904fe5e8a5a2c336065e16e3253d Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Fri, 29 Mar 2019 03:27:43 -0400 Subject: [PATCH] Do not spawn tasks in SbyTask constructor; rely on taskloop to do it. Signed-off-by: William D. Jones --- sbysrc/sby_core.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index a57439e..37bf5ba 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -81,17 +81,12 @@ class SbyTask: self.job.tasks_pending.append(self) for dep in self.deps: - dep.register_dep(self) + if not dep.finished: + dep.notify.append(self) self.output_callback = None self.exit_callback = None - def register_dep(self, next_task): - if self.finished: - next_task.poll() - else: - self.notify.append(next_task) - def log(self, line): if line is not None and (self.noprintregex is None or not self.noprintregex.match(line)): if self.logfile is not None: