CC-4916: Pypo cannot handle Schedule updates after rabbitmq restart happens

-fixed
This commit is contained in:
Martin Konecny 2013-03-01 15:52:41 -05:00
parent 2f33e99ff5
commit 764ee0389f
1 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import logging
import traceback
import sys
from configobj import ConfigObj
from threading import Thread
@ -112,10 +113,8 @@ class PypoMessageHandler(Thread):
# ACK the message to take it off the queue
message.ack()
except (IOError, AttributeError), e:
import traceback
top = traceback.format_exc()
self.logger.error('Exception: %s', e)
self.logger.error("traceback: %s", top)
self.logger.error("traceback: %s", traceback.format_exc())
while not self.init_rabbit_mq():
self.logger.error("Error connecting to RabbitMQ Server. Trying again in few seconds")
time.sleep(5)