From 7b463c6ca4a93f0d97d67b921a0fe75d445acd70 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" <antoine.romain.dumont@gmail.com> Date: Thu, 22 Sep 2016 13:42:19 +0200 Subject: [PATCH] Archiver: Fix to copy only to targeted destination Before that, it could for example pushed copies to other mirrors where the content was missing. --- swh/archiver/worker.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/swh/archiver/worker.py b/swh/archiver/worker.py index f7f8938..4f797e5 100644 --- a/swh/archiver/worker.py +++ b/swh/archiver/worker.py @@ -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) -- GitLab