Mejoras en cerebro

This commit is contained in:
2020-11-20 16:20:22 -03:00
parent d67ffbced2
commit 9be47df527
8 changed files with 81 additions and 47 deletions

View File

@ -95,9 +95,7 @@ class Email(Thread):
def run(self) -> None:
self.start_workers()
worker = Thread(target=exit_thread, args=(self.params['events']['stop'], self.params['logging']))
self.add_worker(worker)
worker.start()
self.worker_status.append(True)
while not self.params['events']['stop'].is_set():
if not self.check_workers():
@ -106,3 +104,4 @@ class Email(Thread):
self.params['logging'].log('Waiting for workers', type(self))
self.params['events']['log_stop'].set()
self.join_workers()
worker.join()