From 6704dfc0e714f8843b915442e2e817a7175b5965 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 7 Jul 2017 13:08:11 +0100 Subject: [PATCH] Add workaround for broken pika which cannot handle long-running connections. --- perform-tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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): -- 1.8.3.1