Skip to content

Instantly share code, notes, and snippets.

@pyk

pyk/config.py

Last active Feb 18, 2019
Embed
What would you like to do?
config.py
from os import environ as env
import multiprocessing
PORT = int(env.get("PORT", 8080))
DEBUG_MODE = int(env.get("DEBUG_MODE", 1))
# Gunicorn config
bind = ":" + str(PORT)
workers = multiprocessing.cpu_count() * 2 + 1
threads = 2 * multiprocessing.cpu_count()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.