You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems counter-intuitive to me that the "caller" (frontend.py) should need to depend on the implementation details (and dependent modules) of the task. I'd like to decouple them so that changes to the Backend logic don't require a redeploy of the Frontend.
Is there any way around this? I've tried having the tasks depend on current_app, but: a) this is discouraged in the docs; b) it leads to complex import dependencies (i.e., the frontend's app instance has to be defined before any tasks are imported -- otherwise current_app refers to a "default" instance). Also, using DI makes the issue more complex (since the Celery instance has to be injected).
The text was updated successfully, but these errors were encountered:
Suppose I have two components: Frontend and Backend and the Celery Worker as the Backend.
[backend.py]
[tasks.py]
[frontend.py]
It seems counter-intuitive to me that the "caller" (frontend.py) should need to depend on the implementation details (and dependent modules) of the task. I'd like to decouple them so that changes to the Backend logic don't require a redeploy of the Frontend.
Is there any way around this? I've tried having the tasks depend on current_app, but: a) this is discouraged in the docs; b) it leads to complex import dependencies (i.e., the frontend's app instance has to be defined before any tasks are imported -- otherwise current_app refers to a "default" instance). Also, using DI makes the issue more complex (since the Celery instance has to be injected).
The text was updated successfully, but these errors were encountered: