use AMQP heartbeat feature

This commit is contained in:
Roberto Soto 2019-11-02 20:00:43 -07:00
parent 5b3c0cb1c8
commit 8a0f474075

View file

@ -49,7 +49,8 @@ class PypoMessageHandler(Thread):
with Connection(self.config["host"], \ with Connection(self.config["host"], \
self.config["user"], \ self.config["user"], \
self.config["password"], \ self.config["password"], \
self.config["vhost"]) as connection: self.config["vhost"], \
hearbeat = 4) as connection:
rabbit = RabbitConsumer(connection, [schedule_queue], self) rabbit = RabbitConsumer(connection, [schedule_queue], self)
rabbit.run() rabbit.run()
except Exception, e: except Exception, e: