Skip to content

Instantly share code, notes, and snippets.

@pyk
Last active February 18, 2019 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pyk/51a7db451f2ab66d9764df04cfb0222b to your computer and use it in GitHub Desktop.
Save pyk/51a7db451f2ab66d9764df04cfb0222b to your computer and use it in GitHub Desktop.
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