handle execptions during decode to avoid worker drain

This commit is contained in:
Jakob Ketterl 2019-08-23 22:32:46 +02:00
parent 62e9a39557
commit 5cc67aba15

View File

@ -27,8 +27,11 @@ class WsjtQueueWorker(threading.Thread):
def run(self) -> None: def run(self) -> None:
while self.doRun: while self.doRun:
(processor, file) = self.queue.get() (processor, file) = self.queue.get()
try:
logger.debug("processing file %s", file) logger.debug("processing file %s", file)
processor.decode(file) processor.decode(file)
except Exception:
logger.exception("failed to decode job")
self.queue.task_done() self.queue.task_done()