Explorar o código

Tests passing

Ask Solem %!s(int64=13) %!d(string=hai) anos
pai
achega
7c4d679a28

+ 5 - 0
celery/app/abstract.py

@@ -17,6 +17,11 @@ class _configurated(type):
                                           for attr, spec in attrs.iteritems()
                                           for attr, spec in attrs.iteritems()
                                               if isinstance(spec, from_config))
                                               if isinstance(spec, from_config))
         inherit_from = attrs.get("inherit_confopts", ())
         inherit_from = attrs.get("inherit_confopts", ())
+        for subcls in bases:
+            try:
+                attrs["__confopts__"].update(subcls.__confopts__)
+            except AttributeError:
+                pass
         for subcls in inherit_from:
         for subcls in inherit_from:
             attrs["__confopts__"].update(subcls.__confopts__)
             attrs["__confopts__"].update(subcls.__confopts__)
         attrs = dict((k, v if not isinstance(v, from_config) else None)
         attrs = dict((k, v if not isinstance(v, from_config) else None)

+ 1 - 1
celery/tests/test_bin/test_celeryd.py

@@ -120,7 +120,7 @@ class test_Worker(AppCase):
         celery = Celery(set_as_current=False)
         celery = Celery(set_as_current=False)
         celery.IS_WINDOWS = True
         celery.IS_WINDOWS = True
         with self.assertRaises(SystemExit):
         with self.assertRaises(SystemExit):
-            celery.Worker(run_clockservice=True)
+            celery.Worker(embed_clockservice=True)
 
 
     def test_tasklist(self):
     def test_tasklist(self):
         celery = Celery(set_as_current=False)
         celery = Celery(set_as_current=False)

+ 4 - 4
celery/worker/__init__.py

@@ -110,10 +110,10 @@ class Timers(abstract.Component):
             # Default Timer is set by the pool, as e.g. eventlet
             # Default Timer is set by the pool, as e.g. eventlet
             # needs a custom implementation.
             # needs a custom implementation.
             w.eta_scheduler_cls = w.pool.Timer
             w.eta_scheduler_cls = w.pool.Timer
-            w.scheduler = self.instantiate(w.eta_scheduler_cls,
+        w.scheduler = self.instantiate(w.eta_scheduler_cls,
-                                    precision=w.eta_scheduler_precision,
+                                precision=w.eta_scheduler_precision,
-                                    on_error=w.on_timer_error,
+                                on_error=w.on_timer_error,
-                                    on_tick=w.on_timer_tick)
+                                on_tick=w.on_timer_tick)
 
 
 
 
 class StateDB(abstract.Component):
 class StateDB(abstract.Component):