Skip to content
Snippets Groups Projects
Commit 7b463c6c authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

Archiver: Fix to copy only to targeted destination

Before that, it could for example pushed copies to other mirrors where
the content was missing.
parent 9a6bb861
No related branches found
No related tags found
No related merge requests found
......@@ -410,8 +410,4 @@ class ArchiverToBackendWorker(BaseArchiveWorker):
return False
def choose_backup_servers(self, present, missing):
missing = list(missing)
present = list(present)
destinations = random.sample(missing, len(missing))
sources = [random.choice(present) for dest in destinations]
yield from zip(sources, destinations)
yield (random.choice(present), self.destination)
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