mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-09 18:08:00 +00:00
make sure exceptions don't bring down workers
This commit is contained in:
parent
aa8090eebb
commit
3968799d6f
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue