From 4cc1642ab3dffcfc2f177dd24ed751bfd4ac6c8d Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Mon, 12 Dec 2016 09:40:49 -0500 Subject: [PATCH] clarity edit of uWSGI chain reload task --- awx/main/tasks.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 8e1c5b9731..e0dcae0fca 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -85,8 +85,11 @@ def celery_startup(conf=None, **kwargs): def uwsgi_reload(): - "Does chain reload of uWSGI" - os.system("echo c > /tmp/awxfifo") + # 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('/tmp/awxfifo', 'w') as awxfifo: + awxfifo.write(TRIGGER_CHAIN_RELOAD) @task(queue='broadcast_all')