Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost

master
Aevann1 2022-08-24 22:26:44 +02:00
commit 26c1267654
1 changed files with 15 additions and 1 deletions

View File

@ -10,7 +10,21 @@ reload = True
#print_config = True
def worker_abort(worker):
worker.log.warning(f"Worker {worker.pid} received SIGABRT.")
try:
import flask
r = flask.request
worker.log.warning(f"While serving {r.method} {r.url}")
from files.helpers.wrappers import get_logged_in_user
u = get_logged_in_user()
if u:
worker.log.warning(f"User: {u.username!r} id:{u.id}")
else:
worker.log.warning(f"User: not logged in")
except:
worker.log.warning("No request info")
import os
worker.log.info("Worker %s received SIGABRT." % worker.pid)
os.abort()