From 60776a0d1956b50e75c9f361218fef955c265d9c Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 10 Jun 2014 12:39:04 +0100 Subject: Note future improvement for fetching artifacts from remote cache --- distbuild/worker_build_scheduler.py | 3 +++ morphlib/buildcommand.py | 4 ++++ 2 files changed, 7 insertions(+) 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), -- cgit v1.2.1