mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Force shutdown of mongo after requesting a service stop. Just in case.
This commit is contained in:
parent
c6e3798259
commit
b45ea4f1f4
@ -138,6 +138,11 @@ def mongodb_control(cmd):
|
||||
if err:
|
||||
logger.error(err)
|
||||
|
||||
if cmd == 'stop':
|
||||
time.sleep(30)
|
||||
p = subprocess.Popen('sudo mongod --shutdown -c /etc/mongod.conf')
|
||||
out, err = p.communicate()
|
||||
logger.info("Shutdown command output: %s;%s" % (out, err))
|
||||
|
||||
@task(bind=True)
|
||||
def handle_work_error(self, task_id, subtasks=None):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user