This repository has been archived on 2024-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
local-llm-server/llm_server/pre_fork.py

12 lines
355 B
Python

import sys
from llm_server.custom_redis import redis
from llm_server.logging import create_logger
def server_startup(s):
if not redis.get('daemon_started', dtype=bool):
logger = create_logger('gunicorn')
logger.fatal('Could not find the key daemon_started in Redis. Did you forget to start the daemon process?')
sys.exit(1)