Browse Source

-A mod will now find any celery instance in the module

Ask Solem 12 years ago
parent
commit
d20509692c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      celery/bin/base.py

+ 4 - 0
celery/bin/base.py

@@ -407,6 +407,10 @@ class Command(object):
                 if getattr(sym, '__path__', None):
                     return self.find_app('{0}.celery:'.format(
                                          app.replace(':', '')))
+                from celery.app.base import Celery
+                for suspect in vars(sym).itervalues():
+                    if isinstance(suspect, Celery):
+                        return suspect
                 raise
         return sym