Files
notifications-admin/gunicorn_config.py
Carlo Costino f69e3a5a00 Undo recent changes related to Python upgrade
This changeset undoes the recent changes we tried after the Python 3.13 update as they had no bearing on the SSL cert validation errors.  Back to the drawing board!

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2025-07-29 16:32:52 -04:00

23 lines
646 B
Python

import multiprocessing
import os
import sys
import traceback
import gunicorn
# Let gunicorn figure out the right number of workers
# The recommended formula is cpu_count() * 2 + 1
# but we have an unusual configuration with a lot of cpus and not much memory
# so adjust it.
workers = multiprocessing.cpu_count()
worker_class = "gevent"
bind = "0.0.0.0:{}".format(os.getenv("PORT"))
disable_redirect_access_to_syslog = True
gunicorn.SERVER_SOFTWARE = "None"
def worker_abort(worker):
worker.log.info("worker received ABORT")
for stack in sys._current_frames().values():
worker.log.error("".join(traceback.format_stack(stack)))