diff --git a/requirements/common.in b/requirements/common.in index c781b86318..e8294025a8 100644 --- a/requirements/common.in +++ b/requirements/common.in @@ -99,7 +99,7 @@ ndg-httpsclient==0.5.1 # Needed to access rabbitmq # See #8466 for why we're not using the latest version. -pika==0.12.0 +pika==0.13.0 # Needed to access our database psycopg2==2.7.7 --no-binary psycopg2 diff --git a/requirements/dev.txt b/requirements/dev.txt index a5a817a03b..e5a8d766f0 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -109,7 +109,7 @@ pbr==5.1.1 # via mock pexpect==4.6.0 # via ipython phonenumberslite==8.10.4 # via django-phonenumber-field pickleshare==0.7.5 # via ipython -pika==0.12.0 +pika==0.13.0 pillow==5.4.1 pip-tools==2.0.2 polib==1.1.0 diff --git a/requirements/prod.txt b/requirements/prod.txt index 9109b10070..09f990524b 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -79,7 +79,7 @@ pbr==5.1.1 # via mock pexpect==4.6.0 # via ipython phonenumberslite==8.10.4 # via django-phonenumber-field pickleshare==0.7.5 # via ipython -pika==0.12.0 +pika==0.13.0 pillow==5.4.1 polib==1.1.0 premailer==3.2.0 diff --git a/zerver/lib/queue.py b/zerver/lib/queue.py index 0ab2cc1d72..39831ebe9a 100644 --- a/zerver/lib/queue.py +++ b/zerver/lib/queue.py @@ -8,6 +8,7 @@ from typing import Any, Callable, Dict, List, Mapping, Optional, Set, Union from django.conf import settings import pika +import pika.adapters.tornado_connection from pika.adapters.blocking_connection import BlockingChannel from pika.spec import Basic from tornado import ioloop @@ -161,10 +162,10 @@ class SimpleQueueClient: def stop_consuming(self) -> None: self.channel.stop_consuming() -# Patch pika.adapters.TornadoConnection so that a socket error doesn't +# Patch pika.adapters.tornado_connection.TornadoConnection so that a socket error doesn't # throw an exception and disconnect the tornado process from the rabbitmq # queue. Instead, just re-connect as usual -class ExceptionFreeTornadoConnection(pika.adapters.TornadoConnection): +class ExceptionFreeTornadoConnection(pika.adapters.tornado_connection.TornadoConnection): def _adapter_disconnect(self) -> None: try: super()._adapter_disconnect()