Remove superflous sleep when shutting mongo down

This commit is contained in:
Matthew Jones 2015-07-06 14:19:12 -04:00
parent 9b03d22d75
commit 26af43dab6

View File

@ -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)