~dricottone/apkbuilds

ref: 5227293f32cf5072200e1d4aa78c9a434f272472 apkbuilds/src/git.sr.ht/git.sr.ht.gunicorn.conf.py -rw-r--r-- 354 bytes
5227293fDominic Ricottone Alpine 3.19 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
from prometheus_client import multiprocess
import traceback
import io

def worker_abort(worker):
    debug_info = io.StringIO()
    debug_info.write("Traceback at time of timeout:\n")
    traceback.print_stack(file=debug_info)
    worker.log.critical(debug_info.getvalue())

def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)