make sure exceptions don't bring down workers

This commit is contained in:
Izalia Mae 2022-12-08 03:51:10 -05:00
parent aa8090eebb
commit 3968799d6f

View file

@ -4,6 +4,7 @@ import os
import queue
import signal
import threading
import traceback
from aiohttp import web
from datetime import datetime, timedelta
@ -175,6 +176,10 @@ class PushWorker(threading.Thread):
except queue.Empty:
pass
## make sure an exception doesn't bring down the worker
except Exception:
traceback.print_exc()
await self.client.close()