# Pastebin tGFBWBji Index: sir/amqp/handler.py IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/sir/amqp/handler.py b/sir/amqp/handler.py --- a/sir/amqp/handler.py (revision 0d137b90b7af2ce1d2e490afb1abe6fbd09d88ea) +++ b/sir/amqp/handler.py (date 1629229982734) @@ -193,8 +193,10 @@ self.connection.close() conn = create_amqp_connection() + self.connection = conn logger.debug("Heartbeat value: %s" % conn.heartbeat) ch = conn.channel() + self.channel = ch # Keep in mind that `prefetch_size` is not supported by the version of RabbitMQ that # we are currently using (https://www.rabbitmq.com/specification.html). # Limits are requires because consumer connection might time out when receive buffer @@ -204,8 +206,6 @@ add_handler("search.index", self.index_callback, ch) add_handler("search.delete", self.delete_callback, ch) - self.connection = conn - self.channel = ch @action_wrapper def requeue_message(self, msg, exc, fail=False):