Skip to content

Dependency on celery lacks documentation #1114

@sumpfralle

Description

@sumpfralle

Describe the bug

Recently (commit a6a21d3) a dependency on celery was introduced. Probably it was meant to be triggered only, if celery is active (which would cause the import of tasks.py). But in reality it is also triggered, if other task queue handlers are running (in my case: huey).

To Reproduce
Add oauth2_provider and huey to INSTALLED_APPS and ensure, that the celery module is not available.
python3 manage.py runserver will fail due to the missing celery module.

Expected behavior
I could imagine the following behaviors to be more desirable:

  • A) a missing celery module is silently ignored
  • B) celery is only imported, if celery is found in settings.INSTALLED_APPS
  • C) the active task queue manager (e.g. celery or huey) is detected (e.g. by inspecting settings.INSTALLED_APPS) and the relevant decorator is selected

Version
1.7.0

  • I have tested with the latest published release and it's still a problem.
  • I have tested with the master branch and it's still a problem.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions