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

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

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

 

 

def _import_all_submodules(module=vars()): 

import importlib 

import pkgutil 

 

try: 

path = module['__path__'] 

except KeyError: 

# not a package, does not have submodules 

return 

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

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

module[name] = submodule 

_import_all_submodules(vars(submodule)) 

 

 

# Recursively import all submodules. 

_import_all_submodules()