Skip to content

Commit

Permalink
UnpackingScheduler: Initialize managers in start
Browse files Browse the repository at this point in the history
Related #1049
  • Loading branch information
maringuu committed Jun 19, 2023
1 parent 56907c0 commit f03b8ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/scheduler/unpacking_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f03b8ad

Please sign in to comment.