Update utils.py
This commit is contained in:
parent
e92f55cc12
commit
5b697b9c56
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue