summaryrefslogtreecommitdiff
path: root/distbuild
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-04-23 17:03:04 +0100
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-04-23 17:32:36 +0100
commit29e199cef71eec9792a833334cd9aa3ae258dd9d (patch)
treedda4608846e269aa65489a47718a3269589b7d66 /distbuild
parent99b9efa9dd588afdc4f1e189380a4c71bbc7114e (diff)
downloadmorph-29e199cef71eec9792a833334cd9aa3ae258dd9d.tar.gz
Check whether request id is in the event's id list
The contents of the message has changed for several events, event messages that need to be sent to several initiators have a list of ids instead of a single id.
Diffstat (limited to 'distbuild')
-rw-r--r--distbuild/build_controller.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/distbuild/build_controller.py b/distbuild/build_controller.py
index 31828979..f596a295 100644
--- a/distbuild/build_controller.py
+++ b/distbuild/build_controller.py
@@ -467,11 +467,12 @@ class BuildController(distbuild.StateMachine):
def _maybe_relay_build_step_started(self, event_source, event):
distbuild.crash_point()
- if event.initiator_id != self._request['id']:
+ if self._request['id'] not in event.initiators:
return # not for us
logging.debug(
'BC: _relay_build_step_started: %s' % event.artifact_cache_key)
+
artifact = self._find_artifact(event.artifact_cache_key)
if artifact is None:
# This is not the event you are looking for.
@@ -497,7 +498,7 @@ class BuildController(distbuild.StateMachine):
def _maybe_relay_build_output(self, event_source, event):
distbuild.crash_point()
- if event.msg['id'] != self._request['id']:
+ if self._request['id'] not in event.msg['ids']:
return # not for us
logging.debug('BC: got output: %s' % repr(event.msg))
@@ -515,7 +516,8 @@ class BuildController(distbuild.StateMachine):
def _maybe_relay_build_caching(self, event_source, event):
distbuild.crash_point()
- if event.initiator_id != self._request['id']:
+
+ if self._request['id'] not in event.initiators:
return # not for us
artifact = self._find_artifact(event.artifact_cache_key)
@@ -538,7 +540,7 @@ class BuildController(distbuild.StateMachine):
def _maybe_check_result_and_queue_more_builds(self, event_source, event):
distbuild.crash_point()
- if event.msg['id'] != self._request['id']:
+ if self._request['id'] not in event.msg['ids']:
return # not for us
artifact = self._find_artifact(event.artifact_cache_key)
@@ -579,8 +581,8 @@ class BuildController(distbuild.StateMachine):
def _maybe_notify_build_failed(self, event_source, event):
distbuild.crash_point()
- if event.msg['id'] != self._request['id']:
- return
+ if self._request['id'] not in event.msg['ids']:
+ return # not for us
artifact = self._find_artifact(event.artifact_cache_key)