Revert "averez-docker: try having loginput die harder for supervisord when rabbitmq is not ready"

This reverts commit d2f51a0573.
This commit is contained in:
Anthony Verez 2014-05-05 15:03:08 -07:00
Родитель 68bff5e60f
Коммит 7bfe23c2f5
1 изменённых файлов: 3 добавлений и 8 удалений

Просмотреть файл

@ -5,10 +5,8 @@
#
# Contributors:
# Jeff Bryner jbryner@mozilla.com
# Anthony Verez averez@mozilla.com
import sys
import os
import bottle
from bottle import debug,route, run, template, response,request,post, default_app
from bottle import _stdout as bottlelog
@ -106,6 +104,8 @@ def initConfig():
options.mqserver=getConfig('mqserver','localhost',options.configfile)
options.taskexchange=getConfig('taskexchange','eventtask',options.configfile)
#options.esserver=getConfig('esserver','localhost',options.configfile)
options.esservers=list(getConfig('esservers','http://localhost:9200',options.configfile).split(','))
options.mquser=getConfig('mquser','guest',options.configfile)
options.mqpassword=getConfig('mqpassword','guest',options.configfile)
options.mqport=getConfig('mqport',5672,options.configfile)
@ -126,12 +126,7 @@ else:
eventTaskExchange=Exchange(name=options.taskexchange,type='direct',durable=True)
eventTaskExchange(mqConn).declare()
eventTaskQueue=Queue(options.taskexchange,exchange=eventTaskExchange)
# Hack for supervisord, rabbit is not fully started when loginput starts
try:
eventTaskQueue(mqConn).declare()
except:
sys.exit(1)
eventTaskQueue(mqConn).declare()
mqproducer = mqConn.Producer(serializer='json')
application = default_app()