Browse Source

Registry: Task.type is only for old task classes

Ask Solem 12 years ago
parent
commit
9156b9d190
1 changed files with 1 additions and 1 deletions
  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):