Unverified Commit 24e07175 authored by TheTechRobo's avatar TheTechRobo Committed by GitHub
Browse files

Update hypercorn_conf.py

parent ae9c6374
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
# Convert environment variables to configuration
# e.g. GUNICORN_WORKERS=4
# The GUNICORN_  must be capatalised
# e.g. HYPERCORN_WORKERS=4
# The HYPERCORN_  must be capatalised

import os

for k,v in os.environ.items():
    if k.startswith("GUNICORN_"):
    if k.startswith("HYPERCORN_"):
        key = k.split('_', 1)[1].lower()
        locals()[key] = v