From: Richard W.M. Jones Date: Fri, 7 Jul 2017 12:08:11 +0000 (+0100) Subject: Add workaround for broken pika which cannot handle long-running connections. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=6704dfc0e714f8843b915442e2e817a7175b5965;p=patchq.git Add workaround for broken pika which cannot handle long-running connections. --- diff --git a/perform-tests.py b/perform-tests.py index 2f9eb8b..b8c6079 100755 --- a/perform-tests.py +++ b/perform-tests.py @@ -25,8 +25,10 @@ import tempfile import config +# Because tests are very long running, turn off heartbeats. +# https://stackoverflow.com/questions/14572020/handling-long-running-tasks-in-pika-rabbitmq connection = pika.BlockingConnection(pika.ConnectionParameters( - host = config.mq_server)) + host = config.mq_server, heartbeat_interval=0)) channel = connection.channel() def ack(method):