summaryrefslogtreecommitdiff
path: root/src/buildstream/_scheduler
diff options
context:
space:
mode:
authorBenjamin Schubert <bschubert15@bloomberg.net>2019-12-06 11:01:24 +0000
committerBenjamin Schubert <contact@benschubert.me>2019-12-07 18:18:23 +0000
commit3b91d1b02cb62730c640b3688f2cfc8486f008d7 (patch)
tree1c370105bdc59d51ba3890a66919a5b31510f518 /src/buildstream/_scheduler
parent0e4cbd55020d835782bb42d6e543d489d6ea0924 (diff)
downloadbuildstream-3b91d1b02cb62730c640b3688f2cfc8486f008d7.tar.gz
job.py: Remove '_watcher' attribute, it is not needed
We don't need to keep a reference to the watcher, let's remove it.
Diffstat (limited to 'src/buildstream/_scheduler')
-rw-r--r--src/buildstream/_scheduler/jobs/job.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/buildstream/_scheduler/jobs/job.py b/src/buildstream/_scheduler/jobs/job.py
index e7866bcd4..c5c14ff0f 100644
--- a/src/buildstream/_scheduler/jobs/job.py
+++ b/src/buildstream/_scheduler/jobs/job.py
@@ -131,7 +131,6 @@ class Job:
self._scheduler = scheduler # The scheduler
self._queue = None # A message passing queue
self._process = None # The Process object
- self._watcher = None # Child process watcher
self._listening = False # Whether the parent is currently listening
self._suspended = False # Whether this job is currently suspended
self._max_retries = max_retries # Maximum number of automatic retries
@@ -209,8 +208,8 @@ class Job:
# an event loop callback. Otherwise, if the job completes too fast, then
# the callback is called immediately.
#
- self._watcher = asyncio.get_child_watcher()
- self._watcher.add_child_handler(self._process.pid, self._parent_child_completed)
+ watcher = asyncio.get_child_watcher()
+ watcher.add_child_handler(self._process.pid, self._parent_child_completed)
# terminate()
#