summaryrefslogtreecommitdiff
path: root/buildstream/_cas/cascache.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/_cas/cascache.py')
-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):