From 686069d283ab6792adb0c6c8310c3c9af4512a6a Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 13 Oct 2015 15:50:12 -0700 Subject: [PATCH 1/2] Allowing to specify the gunicorn timeout in CLI and config --- panoramix/bin/panoramix | 6 +++++- panoramix/config.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/panoramix/bin/panoramix b/panoramix/bin/panoramix index 2f9066aadd865..9a7ac4f0b7147 100755 --- a/panoramix/bin/panoramix +++ b/panoramix/bin/panoramix @@ -26,7 +26,10 @@ manager.add_command('db', MigrateCommand) @manager.option( '-p', '--port', default=config.get("PANORAMIX_WEBSERVER_PORT"), help="Specify the port on which to run the web server") -def runserver(debug, port): +@manager.option( + '-t', '--timeout', default=config.get("PANORAMIX_WEBSERVER_TIMEOUT"), + help="Specify the timeout (seconds) for the gunicorn web server") +def runserver(debug, port, timeout): """Starts a Panoramix web server""" debug = debug or config.get("DEBUG") if debug: @@ -38,6 +41,7 @@ def runserver(debug, port): cmd = ( "gunicorn " "-w 8 " + "--timeout {timeout} " "-b 0.0.0.0:{port} " "panoramix:app").format(**locals()) print("Starting server with command: " + cmd) diff --git a/panoramix/config.py b/panoramix/config.py index 936caa22b84dc..b9d22d5fe3b24 100644 --- a/panoramix/config.py +++ b/panoramix/config.py @@ -19,6 +19,7 @@ WEBSERVER_THREADS = 8 PANORAMIX_WEBSERVER_PORT = 8088 +PANORAMIX_WEBSERVER_TIMEOUT = 30 CUSTOM_SECURITY_MANAGER = None # --------------------------------------------------------- From 0a1eb64da0634fc3afd8a8e09bcacf751c51986c Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 13 Oct 2015 16:06:37 -0700 Subject: [PATCH 2/2] Bumping timeout to 60 --- panoramix/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panoramix/config.py b/panoramix/config.py index b9d22d5fe3b24..7b57117c72f59 100644 --- a/panoramix/config.py +++ b/panoramix/config.py @@ -19,7 +19,7 @@ WEBSERVER_THREADS = 8 PANORAMIX_WEBSERVER_PORT = 8088 -PANORAMIX_WEBSERVER_TIMEOUT = 30 +PANORAMIX_WEBSERVER_TIMEOUT = 60 CUSTOM_SECURITY_MANAGER = None # ---------------------------------------------------------