From 26af43dab69607d29a537ad6ce8e50142737e805 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 6 Jul 2015 14:19:12 -0400 Subject: [PATCH] Remove superflous sleep when shutting mongo down --- awx/main/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 90eddb1ab4..e6ea530f81 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -144,9 +144,9 @@ def mongodb_control(cmd): logger.error(err) if cmd == 'stop' and shutdown_failed: - time.sleep(30) p = subprocess.Popen('sudo mongod --shutdown -f /etc/mongod.conf', shell=True) out, err = p.communicate() + p.wait() logger.info("Shutdown command output: %s;%s" % (out, err)) @task(bind=True)