Explorar o código

Registry: Task.type is only for old task classes

Ask Solem %!s(int64=13) %!d(string=hai) anos
pai
achega
9156b9d190
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      celery/app/registry.py

+ 1 - 1
celery/app/registry.py

@@ -52,7 +52,7 @@ class TaskRegistry(dict):
 
     def filter_types(self, type):
         return dict((name, task) for name, task in self.iteritems()
-                                    if task.type == type)
+                                if getattr(task, 'type', 'regular') == type)
 
 
 def _unpickle_task(name):