mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 17:45:32 -04:00
change gunicorn timeout to 240 seconds
This commit is contained in:
2
Makefile
2
Makefile
@@ -42,7 +42,7 @@ watch-frontend: ## Build frontend and watch for changes
|
|||||||
|
|
||||||
.PHONY: run-flask
|
.PHONY: run-flask
|
||||||
run-flask: ## Run flask
|
run-flask: ## Run flask
|
||||||
poetry run newrelic-admin run-program flask run -p 6012 --host=0.0.0.0
|
poetry run newrelic-admin run-program gunicorn -c gunicorn_config.py gunicorn_entry:application -b 0.0.0.0:6012
|
||||||
|
|
||||||
.PHONY: run-flask-bare
|
.PHONY: run-flask-bare
|
||||||
run-flask-bare: ## Run flask without invoking poetry so we can override ENV variables in .env
|
run-flask-bare: ## Run flask without invoking poetry so we can override ENV variables in .env
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ import multiprocessing
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
import logging
|
||||||
|
from app.utils import hilite
|
||||||
import gunicorn
|
import gunicorn
|
||||||
|
|
||||||
# Let gunicorn figure out the right number of workers
|
# Let gunicorn figure out the right number of workers
|
||||||
@@ -11,6 +12,10 @@ import gunicorn
|
|||||||
# so adjust it.
|
# so adjust it.
|
||||||
workers = multiprocessing.cpu_count()
|
workers = multiprocessing.cpu_count()
|
||||||
worker_class = "gevent"
|
worker_class = "gevent"
|
||||||
|
|
||||||
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
logging.info(hilite("Gunicorn timeout set to 240 seconds"))
|
||||||
|
timeout = 240
|
||||||
bind = "0.0.0.0:{}".format(os.getenv("PORT"))
|
bind = "0.0.0.0:{}".format(os.getenv("PORT"))
|
||||||
disable_redirect_access_to_syslog = True
|
disable_redirect_access_to_syslog = True
|
||||||
gunicorn.SERVER_SOFTWARE = "None"
|
gunicorn.SERVER_SOFTWARE = "None"
|
||||||
|
|||||||
Reference in New Issue
Block a user