summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-03-13 16:37:34 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-03-27 16:24:32 +0000
commit76cc36c3686b5f440903c9ac56eb2ee07c3e2ffd (patch)
tree53ea1639fc02ad254d028bcb734810393fc00d6a
parentf48343458b6bbe92603c7a12e63a38e18a2f960f (diff)
downloadbuildstream-76cc36c3686b5f440903c9ac56eb2ee07c3e2ffd.tar.gz
cascache.py: Make send_blobs() public
-rw-r--r--buildstream/_cas/cascache.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/buildstream/_cas/cascache.py b/buildstream/_cas/cascache.py
index ebb3c2d5c..b5e483310 100644
--- a/buildstream/_cas/cascache.py
+++ b/buildstream/_cas/cascache.py
@@ -1107,13 +1107,15 @@ class CASCache():
return missing_blobs
- def _send_directory(self, remote, digest, u_uid=uuid.uuid4()):
- missing_blobs = self.remote_missing_blobs_for_directory(remote, digest)
-
- # Upload any blobs missing on the server
- self._send_blobs(remote, missing_blobs, u_uid)
-
- def _send_blobs(self, remote, digests, u_uid=uuid.uuid4()):
+ # send_blobs():
+ #
+ # Upload blobs to remote CAS.
+ #
+ # Args:
+ # remote (CASRemote): The remote repository to upload to
+ # digests (list): The Digests of Blobs to upload
+ #
+ def send_blobs(self, remote, digests, u_uid=uuid.uuid4()):
batch = _CASBatchUpdate(remote)
for digest in digests:
@@ -1135,6 +1137,12 @@ class CASCache():
# Send final batch
batch.send()
+ def _send_directory(self, remote, digest, u_uid=uuid.uuid4()):
+ missing_blobs = self.remote_missing_blobs_for_directory(remote, digest)
+
+ # Upload any blobs missing on the server
+ self.send_blobs(remote, missing_blobs, u_uid)
+
class CASQuota:
def __init__(self, context):