17 lines
407 B
Python
17 lines
407 B
Python
import logging
|
|
import subprocess
|
|
import sys
|
|
import os
|
|
|
|
|
|
def on_starting(server):
|
|
"""Executes code before the master process is initialized"""
|
|
print("GUNICORN ON STARTING HOOOK")
|
|
os.system("python run_cli.py upgrade_db")
|
|
|
|
|
|
|
|
print("LOADING gunnicorn.cfg.py")
|
|
gunicorn_logger = logging.getLogger("gunicorn.error")
|
|
gunicorn_logger.addHandler(logging.StreamHandler(sys.stdout))
|
|
bind = "0.0.0.0:8080"
|