Closed hrbonz closed 8 years ago
Circular import:
get_schedule
is in openkongqi.utils
openkongqi.utils
imports from openkongqi.source (__init__.py)
openkongqi.source (__init__.py)
imports from openkongqi.conf
openkongqi.conf
imports from openkongqi.utils
>>> from openkongqi.utils import get_schedule
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "openkongqi/utils.py", line 11, in <module>
from .source import get_sources
File "openkongqi/source/__init__.py", line 3, in <module>
from ..conf import settings
File "openkongqi/conf.py", line 18, in <module>
from .utils import load_tree, dig_loader
ImportError: cannot import name load_tree
Do you want to instead put this function in the root utils
folder?
Put it in openkongqi.celery
Instead of building the scheduling dict by hand in
celeryconfig.py
, we should be able to call a utilget_schedule
that will return a copy of the dict.