local-llm-server/other/gunicorn.py

21 lines
440 B
Python

"""
This file is used to run certain tasks when the HTTP server starts.
It's located here so it doesn't get imported with daemon.py
"""
from llm_server.logging import create_logger
try:
import gevent.monkey
gevent.monkey.patch_all()
except ImportError:
pass
from llm_server.pre_fork import server_startup
def on_starting(s):
server_startup(s)
logger = create_logger('gunicorn')
logger.info('Startup complete!')