diff options
author | Jürg Billeter <j@bitron.ch> | 2017-07-27 10:59:48 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2017-07-27 11:01:28 +0100 |
commit | 855b63003ee15eb8cdd42f174a9193ee7b942ef5 (patch) | |
tree | 965386d43dda7ce4957055b1d9c7fd4ab8bd897b | |
parent | 7bd590319df360d0aac84eff72f9dabd8b389533 (diff) | |
download | buildstream-855b63003ee15eb8cdd42f174a9193ee7b942ef5.tar.gz |
_scheduler/job.py: Fix respawn
Move parent_start_listening() from __init__ to spawn() to support
respawning a job after shutdown.
-rw-r--r-- | buildstream/_scheduler/job.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/_scheduler/job.py b/buildstream/_scheduler/job.py index c97258c65..e72332267 100644 --- a/buildstream/_scheduler/job.py +++ b/buildstream/_scheduler/job.py @@ -78,8 +78,6 @@ class Job(): self.pid = None # The child's pid in the parent self.result = None # Return value of child action in the parent - self.parent_start_listening() - # spawn() # # Args: @@ -90,6 +88,8 @@ class Job(): self.action = action self.complete = complete + self.parent_start_listening() + # Spawn the process self.process = Process(target=self.child_action, args=[self.element, self.queue, self.action_name]) |