summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-03-26 16:45:42 (GMT)
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-03-26 16:45:42 (GMT)
commit9daf6e77606682a1d470fee941ba5e8ad39eb7f6 (patch)
tree7fc1a596175b6a2d02fd6f77e2be2c85bd980e77
parent75cb21b48adffb8a99b2530c3751d6d920c40a97 (diff)
downloadmorph-9daf6e77606682a1d470fee941ba5e8ad39eb7f6.tar.gz
Try using event.job
Change-Id: I0fdc3b438689693f66b74a41e64ad705834385d7
-rw-r--r--distbuild/worker_build_scheduler.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/distbuild/worker_build_scheduler.py b/distbuild/worker_build_scheduler.py
index e58059b..c9cbe35 100644
--- a/distbuild/worker_build_scheduler.py
+++ b/distbuild/worker_build_scheduler.py
@@ -632,6 +632,7 @@ class WorkerConnection(distbuild.StateMachine):
self.mainloop.queue_event(WorkerConnection, progress)
def _maybe_handle_helper_result(self, event_source, event):
+ job = event.job
if event.msg['id'] == self._current_job_cache_request:
distbuild.crash_point()
@@ -641,7 +642,7 @@ class WorkerConnection(distbuild.StateMachine):
new_event = WorkerBuildFinished(
self._current_job_exec_response,
- self._current_job.artifact.source.cache_key)
+ job.artifact.source.cache_key)
self.mainloop.queue_event(WorkerConnection, new_event)
self.mainloop.queue_event(self, _Cached())
else:
@@ -655,8 +656,7 @@ class WorkerConnection(distbuild.StateMachine):
#
# The BuildController will not try to cancel jobs that have
# been marked as failed.
- self.mainloop.queue_event(WorkerConnection,
- _JobFailed(self._current_job))
+ self.mainloop.queue_event(WorkerConnection, _JobFailed(job))
new_event = WorkerBuildFailed(
self._current_job_exec_response,
@@ -666,7 +666,7 @@ class WorkerConnection(distbuild.StateMachine):
self.mainloop.queue_event(self, _BuildFailed())
self.mainloop.queue_event(WorkerConnection,
- _JobFinished(self._current_job))
+ _JobFinished(job))
self._current_job_exec_response = None
self._current_job_cache_request = None