Skip to content
Snippets Groups Projects
Commit 4b4c5268 authored by Jürg Billeter's avatar Jürg Billeter
Browse files

_artifactcache/casserver.py: Add update_mtime parameter to resolve_ref()

parent 971606ae
No related branches found
No related tags found
Loading
......@@ -431,15 +431,19 @@ class CASCache(ArtifactCache):
#
# Args:
# ref (str): The name of the ref
# update_mtime (bool): Whether to update the mtime of the ref
#
# Returns:
# (Digest): The digest stored in the ref
#
def resolve_ref(self, ref):
def resolve_ref(self, ref, *, update_mtime=False):
refpath = self._refpath(ref)
try:
with open(refpath, 'rb') as f:
if update_mtime:
os.utime(refpath)
digest = remote_execution_pb2.Digest()
digest.ParseFromString(f.read())
return digest
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment