summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-04-23 16:54:28 +0100
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-04-23 17:32:36 +0100
commit00a571bde0a3a6005c4ffa029c5c4239a9c2381c (patch)
tree4dcac23a9e42d67c76b8efe6087d538e21336cdf
parentd56402413409a7d8a8cf337072e039b5aa381c3a (diff)
downloadmorph-00a571bde0a3a6005c4ffa029c5c4239a9c2381c.tar.gz
WorkerConnection: _request_caching
Now we just get everything from the job object
-rw-r--r--distbuild/worker_build_scheduler.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/distbuild/worker_build_scheduler.py b/distbuild/worker_build_scheduler.py
index dbc0dfe4..5c07a55d 100644
--- a/distbuild/worker_build_scheduler.py
+++ b/distbuild/worker_build_scheduler.py
@@ -424,14 +424,14 @@ class WorkerConnection(distbuild.StateMachine):
logging.debug('Requesting shared artifact cache to get artifacts')
- kind = self._artifact.source.morphology['kind']
+ kind = self._job.artifact.source.morphology['kind']
if kind == 'chunk':
- source_artifacts = self._artifact.source.artifacts
+ source_artifacts = self._job.artifact.source.artifacts
suffixes = ['%s.%s' % (kind, name) for name in source_artifacts]
else:
- filename = '%s.%s' % (kind, self._artifact.name)
+ filename = '%s.%s' % (kind, self._job.artifact.name)
suffixes = [filename]
if kind == 'stratum':
@@ -451,7 +451,7 @@ class WorkerConnection(distbuild.StateMachine):
'/1.0/fetch?host=%s:%d&cacheid=%s&artifacts=%s' %
(urllib.quote(worker_host),
self._worker_cache_server_port,
- urllib.quote(self._artifact.cache_key),
+ urllib.quote(self._job.artifact.cache_key),
suffixes))
msg = distbuild.message(
@@ -461,12 +461,9 @@ class WorkerConnection(distbuild.StateMachine):
req = distbuild.HelperRequest(msg)
self.mainloop.queue_event(distbuild.HelperRouter, req)
- progress = WorkerBuildCaching(
- self._initiator_id, self._artifact.cache_key)
+ progress = WorkerBuildCaching(self._job.initiators,
+ self._job.artifact.cache_key)
self.mainloop.queue_event(WorkerConnection, progress)
-
- self._initiator_id = None
- self._finished_msg = event.msg
def _maybe_handle_helper_result(self, event_source, event):
if event.msg['id'] == self._helper_id: