Explorar el Código

Tests passing

Ask Solem hace 12 años
padre
commit
7ff99a3fbd

+ 2 - 2
celery/app/builtins.py

@@ -162,7 +162,7 @@ def add_group_task(app):
 
         def apply_async(self, partial_args=(), kwargs={}, **options):
             if self.app.conf.CELERY_ALWAYS_EAGER:
-                return self.apply(args, kwargs, **options)
+                return self.apply(partial_args, kwargs, **options)
             tasks, result, gid, args = self.prepare(options,
                                             args=partial_args, **kwargs)
             super(Group, self).apply_async((list(tasks),
@@ -310,5 +310,5 @@ def add_chord_task(app):
             res = super(Chord, self).apply(args, dict(kwargs, eager=True),
                                            **options)
             return maybe_subtask(body).apply(
-                        args=(res.get(propagate=propagate).get().join(), ))
+                        args=(res.get(propagate=propagate).get(), ))
     return Chord

+ 1 - 1
celery/app/control.py

@@ -179,7 +179,7 @@ class Control(object):
         return self.broadcast('add_consumer',
                 arguments=dict({'queue': queue, 'exchange': exchange,
                                 'exchange_type': exchange_type,
-                                'routing_key': routing_key}, **options),
+                                'routing_key': routing_key}, **options or {}),
                 **kwargs)
 
     def cancel_consumer(self, queue, **kwargs):

+ 4 - 0
celery/result.py

@@ -693,3 +693,7 @@ class EagerResult(AsyncResult):
     def traceback(self):
         """The traceback if the task failed."""
         return self._traceback
+
+    @property
+    def supports_native_join(self):
+        return False

+ 1 - 1
celery/tests/app/test_builtins.py

@@ -92,7 +92,7 @@ class test_group(Case):
         x = group([add.s(4, 4), add.s(8, 8)])
         x.name = self.task.name
         res = x.apply()
-        self.assertEqual(res.get().join(), [8, 16])
+        self.assertEqual(res.get(), [8, 16])
 
     def test_apply_async(self):
         x = group([add.s(4, 4), add.s(8, 8)])

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

@@ -44,10 +44,10 @@ class test_Command(AppCase):
             Command().run()
 
     @patch('sys.stdout')
-    def test_parse_options_version_only(self, stdout):
+    def test_early_version(self, stdout):
         cmd = Command()
         with self.assertRaises(SystemExit):
-            cmd.parse_options('prog', ['--version'])
+            cmd.early_version(['--version'])
         stdout.write.assert_called_with(cmd.version + '\n')
 
     def test_execute_from_commandline(self):

+ 2 - 2
docs/whatsnew-3.0.rst

@@ -1,4 +1,4 @@
-.. _whatsnew-3.0:
+.. _whatsnew-3.0: (Chiastic Slide) (Chiastic Slide)
 
 ===========================================
  What's new in Celery 3.0 (Chiastic Slide)
@@ -391,7 +391,7 @@ Logging support now conforms better with best practices.
       currently executing task.
 
 - In fact, ``task.get_logger`` is no longer recommended, it is better
-  to add module-level logger to your tasks module.
+  to add a module-level logger to your tasks module.
 
     For example, like this: