mirror of https://github.com/zulip/zulip.git
requirements: Upgrade pika from 0.12.0 to 0.13.0.
The important changes to pika for us are based on this PR of ours: https://github.com/pika/pika/pull/1129 Fixes #11394.
This commit is contained in:
parent
a1a7047819
commit
0d0007742f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue