Skip to content

Commit b7f61ff

Browse files
committed
Updating to amqp version 2.4.2
1 parent e2782c7 commit b7f61ff

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

graypy/rabbitmq.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from logging import Filter
99
from logging.handlers import SocketHandler
1010

11-
from amqplib import client_0_8 as amqp # pylint: disable=import-error
11+
import amqp # pylint: disable=import-error
1212

1313
from graypy.handler import BaseGELFHandler
1414

@@ -73,7 +73,7 @@ def __init__(self, url, exchange='logging.gelf', exchange_type='fanout',
7373
**kwargs
7474
)
7575
SocketHandler.__init__(self, host, port)
76-
self.addFilter(ExcludeFilter('amqplib'))
76+
self.addFilter(ExcludeFilter('amqp'))
7777

7878
def makeSocket(self, timeout=1):
7979
return RabbitSocket(self.cn_args, timeout, self.exchange,
@@ -93,6 +93,7 @@ def __init__(self, cn_args, timeout, exchange, exchange_type, routing_key):
9393
self.routing_key = routing_key
9494
self.connection = amqp.Connection(
9595
connection_timeout=timeout, **self.cn_args)
96+
self.connection.connect()
9697
self.channel = self.connection.channel()
9798
self.channel.exchange_declare(
9899
exchange=self.exchange,

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def run_tests(self):
6666
"pylint>=1.9.3,<2.0.0",
6767
"mock>=2.0.0,<3.0.0",
6868
"requests>=2.20.1,<3.0.0",
69-
"amqplib>=1.0.2,<2.0.0"
69+
"amqp>=2.4.2,<2.5.1"
7070
],
7171
extras_require={
7272
'amqp': [
73-
'amqplib==1.0.2'
73+
'amqp==2.4.2'
7474
],
7575
"docs": [
7676
"sphinx>=2.1.2,<3.0.0",

0 commit comments

Comments
 (0)