Skip to content
Snippets Groups Projects
Commit 00a573f6 authored by Eva Bardou's avatar Eva Bardou
Browse files

Add comments

parent c0c3b5fa
No related branches found
No related tags found
No related merge requests found
......@@ -141,12 +141,14 @@ class BaseWorker(object):
if os.path.isfile(parent_cache_path):
parents_cache_paths.append(parent_cache_path)
# Only one parent cache, we can just copy it into our current task local cache
if len(parents_cache_paths) == 1:
with open(self.cache.path, "rb+") as cache_file, open(
parents_cache_paths[0], "rb"
) as parent_cache_file:
cache_file.truncate(0)
cache_file.write(parent_cache_file.read())
# Many parents caches, we have to merge all of them in our current task local cache
elif len(parents_cache_paths) > 1:
self.cache.merge_parent_caches(parents_cache_paths)
......
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