From f03b8ad5789df0d9c00d97132c902f43ddc4f207 Mon Sep 17 00:00:00 2001 From: Marten Ringwelski Date: Mon, 19 Jun 2023 10:07:10 +0200 Subject: [PATCH] UnpackingScheduler: Initialize managers in start Related #1049 --- src/scheduler/unpacking_scheduler.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scheduler/unpacking_scheduler.py b/src/scheduler/unpacking_scheduler.py index 1d30240be1..315d7f605e 100644 --- a/src/scheduler/unpacking_scheduler.py +++ b/src/scheduler/unpacking_scheduler.py @@ -44,17 +44,20 @@ def __init__(self, post_unpack=None, analysis_workload=None, fs_organizer=None, self.get_analysis_workload = analysis_workload self.in_queue = Queue() self.work_load_counter = 25 - self.manager = Manager() - self.workers = self.manager.list() # type: list[ExtractionContainer] self.worker_tmp_dirs = [] # type: list[TemporaryDirectory] self.pending_tasks: dict[int, Thread] = {} self.post_unpack = post_unpack self.unpacking_locks = unpacking_locks self.unpacker = Unpacker(fs_organizer=fs_organizer, unpacking_locks=unpacking_locks) + + self.manager = None + self.workers = None self.work_load_process = None self.extraction_process = None def start(self): + self.manager = Manager() + self.workers = self.manager.list() # type: list[ExtractionContainer] self.create_containers() self.work_load_process = self.start_work_load_monitor() self.extraction_process = self._start_extraction_loop()