summaryrefslogtreecommitdiff
path: root/distbuild/build_controller.py
diff options
context:
space:
mode:
authorLauren Perry <lauren.perry@codethink.co.uk>2015-03-30 12:32:58 +0100
committerBaserock Gerrit <gerrit@baserock.org>2015-04-17 08:41:58 +0000
commitab92ce0343b838b336313f604ea035a60dfcb960 (patch)
tree945fd98350ba347ca8c2e326670cdfe5f039b765 /distbuild/build_controller.py
parent1c125ade7e19d1f92b49ad010ff4a9ec3faa36e4 (diff)
downloadmorph-ab92ce0343b838b336313f604ea035a60dfcb960.tar.gz
distbuild: Add distbuild-list-jobs function
Add InitiatorListJobs class and list-jobs message template, add distbuild-list-jobs to morph commandlist, send running job information back to initiator, split out handling of build request and list-jobs messages to separate functions and change generating a random integer to UUID for message identification Change-Id: Id02604f2c1201dbc10f6bbd7f501b8ce1ce0deae
Diffstat (limited to 'distbuild/build_controller.py')
-rw-r--r--distbuild/build_controller.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/distbuild/build_controller.py b/distbuild/build_controller.py
index 6058862c..3971fe68 100644
--- a/distbuild/build_controller.py
+++ b/distbuild/build_controller.py
@@ -180,6 +180,12 @@ class BuildController(distbuild.StateMachine):
return '<BuildController at 0x%x, request-id %s>' % (id(self),
self._request['id'])
+ def get_initiator_connection(self):
+ return self._initiator_connection
+
+ def get_request(self):
+ return self._request
+
def setup(self):
distbuild.crash_point()
@@ -483,8 +489,8 @@ class BuildController(distbuild.StateMachine):
def _maybe_notify_initiator_disconnected(self, event_source, event):
if event.id != self._request['id']:
- logging.debug('Heard initiator disconnect with event id %d '
- 'but our request id is %d',
+ logging.debug('Heard initiator disconnect with event id %s '
+ 'but our request id is %s',
event.id, self._request['id'])
return # not for us