mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-22 06:27:59 +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 queue
|
||||||
import signal
|
import signal
|
||||||
import threading
|
import threading
|
||||||
|
import traceback
|
||||||
|
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
@ -175,6 +176,10 @@ class PushWorker(threading.Thread):
|
||||||
except queue.Empty:
|
except queue.Empty:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
## make sure an exception doesn't bring down the worker
|
||||||
|
except Exception:
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
await self.client.close()
|
await self.client.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue