Update utils.py

This commit is contained in:
Dongsheng Yang 2020-05-05 13:21:50 -04:00 committed by Dana Van Aken
parent e92f55cc12
commit 5b697b9c56
1 changed files with 1 additions and 5 deletions

View File

@ -603,11 +603,7 @@ def check_and_run_celery():
hostname = rabbitmq_url.split(':')[0] hostname = rabbitmq_url.split(':')[0]
port = rabbitmq_url.split(':')[1].split('/')[0] port = rabbitmq_url.split(':')[1].split('/')[0]
rabbitmq_status = os.popen('telnet {} {}'.format(hostname, port)).read() rabbitmq_status = os.popen('telnet {} {}'.format(hostname, port)).read()
if 'Connected' in rabbitmq_status: LOG.info(rabbitmq_status)
LOG.info('Rabbitmq is running.')
else:
LOG.warning('Rabbitmq is not running.')
return 'Rabbitmq is not running.'
retries = 0 retries = 0
while retries < 5: while retries < 5: