From 1d6a36876be755ed66d6f02d76a3fc2e42fe7cf0 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Thu, 9 Feb 2017 15:27:58 -0500 Subject: [PATCH] have tasks.py deduce location of uwsgi fifo --- awx/main/tasks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 194cc3c837..0cd0dcf6c8 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -112,7 +112,11 @@ def _uwsgi_reload(): # http://uwsgi-docs.readthedocs.io/en/latest/MasterFIFO.html#available-commands logger.warn('Initiating uWSGI chain reload of server') TRIGGER_CHAIN_RELOAD = 'c' - with open('/var/lib/awx/awxfifo', 'w') as awxfifo: + if settings.DEBUG: + uWSGI_FIFO_LOCATION = '/awxfifo' + else: + uWSGI_FIFO_LOCATION = '/var/lib/awx/awxfifo' + with open(uWSGI_FIFO_LOCATION, 'w') as awxfifo: awxfifo.write(TRIGGER_CHAIN_RELOAD)