summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-10 12:39:04 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-10 12:39:04 +0100
commit60776a0d1956b50e75c9f361218fef955c265d9c (patch)
tree6a1c36d2d103c3df4801c4c83459da2c44cb28bd
parentbe6870d1145634401f912e7f5623da27b20180cd (diff)
downloadmorph-60776a0d1956b50e75c9f361218fef955c265d9c.tar.gz
Note future improvement for fetching artifacts from remote cache
-rw-r--r--distbuild/worker_build_scheduler.py3
-rw-r--r--morphlib/buildcommand.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/distbuild/worker_build_scheduler.py b/distbuild/worker_build_scheduler.py
index 57cc0224..39b7f021 100644
--- a/distbuild/worker_build_scheduler.py
+++ b/distbuild/worker_build_scheduler.py
@@ -536,6 +536,9 @@ class WorkerConnection(distbuild.StateMachine):
self.mainloop.queue_event(WorkerConnection, _NeedJob(self))
def _request_caching(self, event_source, event):
+ # This code should be moved into the morphlib.remoteartifactcache
+ # module. It would be good to share it with morphlib.buildcommand,
+ # which also wants to fetch artifacts from a remote cache.
distbuild.crash_point()
logging.debug('Requesting shared artifact cache to get artifacts')
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py
index 5abef54c..9fab5c07 100644
--- a/morphlib/buildcommand.py
+++ b/morphlib/buildcommand.py
@@ -413,6 +413,10 @@ class BuildCommand(object):
local.close()
for artifact in artifacts:
+ # This block should fetch all artifact files in one go, using the
+ # 1.0/artifacts method of morph-cache-server. The code to do that
+ # needs bringing in from the distbuild.worker_build_connection
+ # module into morphlib.remoteartififactcache first.
to_fetch = []
if not self.lac.has(artifact):
to_fetch.append((self.rac.get(artifact),