mirror of https://github.com/celery/kombu.git
flakes
This commit is contained in:
parent
2a88809157
commit
d823c628ff
|
@ -13,7 +13,7 @@ def fib(n):
|
|||
elif n == 1:
|
||||
return 1
|
||||
else:
|
||||
return fib(n-1) + fib(n-2)
|
||||
return fib(n - 1) + fib(n - 2)
|
||||
|
||||
|
||||
class Worker(ConsumerProducerMixin):
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
|
||||
def hello_task(who='world'):
|
||||
print('Hello {0}'.format(who))
|
||||
|
|
|
@ -44,14 +44,16 @@ if STATICA_HACK: # pragma: no cover
|
|||
from types import ModuleType # noqa
|
||||
|
||||
all_by_module = {
|
||||
'kombu.connection': ['Connection', 'BrokerConnection'],
|
||||
'kombu.entity': ['Exchange', 'Queue', 'binding'],
|
||||
'kombu.messaging': ['Consumer', 'Producer'],
|
||||
'kombu.pools': ['connections', 'producers'],
|
||||
'kombu.utils.url': ['parse_url'],
|
||||
'kombu.common': ['eventloop', 'uuid'],
|
||||
'kombu.serialization': ['enable_insecure_serializers',
|
||||
'disable_insecure_serializers'],
|
||||
'kombu.connection': ['Connection', 'BrokerConnection'],
|
||||
'kombu.entity': ['Exchange', 'Queue', 'binding'],
|
||||
'kombu.messaging': ['Consumer', 'Producer'],
|
||||
'kombu.pools': ['connections', 'producers'],
|
||||
'kombu.utils.url': ['parse_url'],
|
||||
'kombu.common': ['eventloop', 'uuid'],
|
||||
'kombu.serialization': [
|
||||
'enable_insecure_serializers',
|
||||
'disable_insecure_serializers',
|
||||
],
|
||||
}
|
||||
|
||||
object_origins = {}
|
||||
|
|
|
@ -167,7 +167,7 @@ class Producer(object):
|
|||
)
|
||||
|
||||
if expiration is not None:
|
||||
properties['expiration'] = str(int(expiration*1000))
|
||||
properties['expiration'] = str(int(expiration * 1000))
|
||||
|
||||
body, content_type, content_encoding = self._prepare(
|
||||
body, serializer, content_type, content_encoding,
|
||||
|
|
|
@ -1453,7 +1453,7 @@ class test_Transport__init(QPidCase):
|
|||
def test_sets_non_blocking_behavior_on_r_fd(self):
|
||||
Transport(Mock())
|
||||
self.fcntl.fcntl.assert_called_once_with(
|
||||
self.r, self.fcntl.F_SETFL, self.os.O_NONBLOCK)
|
||||
self.r, self.fcntl.F_SETFL, self.os.O_NONBLOCK)
|
||||
|
||||
|
||||
class test_Transport__drain_events(QPidCase):
|
||||
|
|
|
@ -649,12 +649,18 @@ class Channel(virtual.Channel):
|
|||
def _handle_message(self, client, r):
|
||||
if bytes_to_str(r[0]) == 'unsubscribe' and r[2] == 0:
|
||||
client.subscribed = False
|
||||
elif bytes_to_str(r[0]) == 'pmessage':
|
||||
return {'type': r[0], 'pattern': r[1],
|
||||
'channel': r[2], 'data': r[3]}
|
||||
return
|
||||
|
||||
if bytes_to_str(r[0]) == 'pmessage':
|
||||
type, pattern, channel, data = r[0], r[1], r[2], r[3]
|
||||
else:
|
||||
return {'type': r[0], 'pattern': None,
|
||||
'channel': r[1], 'data': r[2]}
|
||||
type, pattern, channel, data = r[0], None, r[1], r[2]
|
||||
return {
|
||||
'type': type,
|
||||
'pattern': pattern,
|
||||
'channel': channel,
|
||||
'data': data,
|
||||
}
|
||||
|
||||
def _receive(self):
|
||||
c = self.subclient
|
||||
|
|
Loading…
Reference in New Issue