Ask Solem 11 years ago
parent
commit
6d61a57d96

+ 2 - 2
celery/backends/redis.py

@@ -84,8 +84,8 @@ class RedisBackend(KeyValueStoreBackend):
         connparams = dict(
             defaults, **dictfilter({
                 'host': host, 'port': port, 'password': password,
-                'db': int(query.pop('virtual_host', None) or 0),
-        }))
+                'db': int(query.pop('virtual_host', None) or 0)})
+        )
 
         if scheme == 'socket':
             # Use 'path' as path to the socket... in this case

+ 2 - 1
celery/bin/worker.py

@@ -182,7 +182,8 @@ class worker(Command):
             raise SystemExit(0)
 
     def run(self, hostname=None, pool_cls=None, app=None, uid=None, gid=None,
-            loglevel=None, logfile=None, pidfile=None, state_db=None, **kwargs):
+            loglevel=None, logfile=None, pidfile=None, state_db=None,
+            **kwargs):
         maybe_drop_privileges(uid=uid, gid=gid)
         # Pools like eventlet/gevent needs to patch libs as early
         # as possible.

+ 2 - 2
celery/tests/backends/test_base.py

@@ -65,8 +65,8 @@ class test_BaseBackend_interface(AppCase):
 
     def test_apply_chord(self, unlock='celery.chord_unlock'):
         self.app.tasks[unlock] = Mock()
-        self.b.apply_chord(group(app=self.app), (),
-            'dakj221', None,
+        self.b.apply_chord(
+            group(app=self.app), (), 'dakj221', None,
             result=[self.app.AsyncResult(x) for x in [1, 2, 3]],
         )
         self.assertTrue(self.app.tasks[unlock].apply_async.call_count)

+ 4 - 4
celery/tests/bin/test_celery.py

@@ -520,12 +520,12 @@ class test_control(AppCase):
     def test_rate_limit(self):
         i = self.control(True)
         i.rate_limit('rate_limit', 'proj.add', '1/s')
-        i.call.assert_called_with('rate_limit', 'proj.add', '1/s', reply=True)
+        i.call.assert_called_with('rate_limit', 'proj.add', '1/s')
 
     def test_time_limit(self):
         i = self.control(True)
         i.time_limit('time_limit', 'proj.add', 10, 30)
-        i.call.assert_called_with('time_limit', 'proj.add', 10, 30, reply=True)
+        i.call.assert_called_with('time_limit', 'proj.add', 10, 30)
 
     def test_add_consumer(self):
         i = self.control(True)
@@ -535,13 +535,13 @@ class test_control(AppCase):
         )
         i.call.assert_called_with(
             'add_consumer', 'queue', 'exchange', 'topic', 'rkey',
-            durable=True, reply=True,
+            durable=True,
         )
 
     def test_cancel_consumer(self):
         i = self.control(True)
         i.cancel_consumer('cancel_consumer', 'queue')
-        i.call.assert_called_with('cancel_consumer', 'queue', reply=True)
+        i.call.assert_called_with('cancel_consumer', 'queue')
 
 
 class test_multi(AppCase):

+ 0 - 1
celery/worker/__init__.py

@@ -12,7 +12,6 @@
 from __future__ import absolute_import
 
 import os
-import socket
 import sys
 import traceback
 try: