summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-03-13 16:37:34 +0000
committerJürg Billeter <j@bitron.ch>2019-03-25 14:58:06 +0100
commitdd1e0361adf79d7ea78703eb2c82fede2d0b165d (patch)
tree6fef73528bd866d88e26b108064684d2a254677c
parent1f6bd1af2b89d3b6310a97cc255a661967fcde55 (diff)
downloadbuildstream-dd1e0361adf79d7ea78703eb2c82fede2d0b165d.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):