Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1"""All Celery tasks are declared in submodules of this module.""" 

2 

3 

4def _import_all_submodules(module=vars()): 

5 import importlib 

6 import pkgutil 

7 

8 try: 

9 path = module['__path__'] 

10 except KeyError: 

11 # not a package, does not have submodules 

12 return 

13 for _, name, _ in pkgutil.iter_modules(path): 

14 submodule = importlib.import_module('.' + name, module['__name__']) 

15 module[name] = submodule 

16 _import_all_submodules(vars(submodule)) 

17 

18 

19_import_all_submodules()