-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[BUG] Celery Background Callback Manager fails with Non-Key/Value-Backends #3729
Copy link
Copy link
Open
Description
Describe your context
This applies to background callbacks using the Celery Background Callback Manager. This should be reproducible using the latest version of dash as well.
dash 3.3.0
dash-ag-grid 33.3.3
dash-iconify 0.1.2
dash-mantine-components 2.5.1
dash-testing-stub 0.0.2
Describe the bug
Celery supports multiple backends that are not a BaseKeyValueStoreBackend:
CassandraBackendDatabaseBackendMongoBackendRPCBackend
However, Dash's CeleryManager assumes the backend to be a BaseKeyValueStoreBackend having the methods set and get.
Configuring any of the backends above will result in an error similar to AttributeError: 'DatabaseBackend' object has no attribute 'get' when triggering a background callback.
Expected behavior
The CeleryManager should either
- support all Celery backends by using
get_resultandstore_resultfromBaseBackendinstead ofgetandsetor - make the restriction more explicit by additional documentation and erroring early on when the configured backend does not implement
BaseKeyValueStoreBackend.
Especially the DatabaseBackend could eliminate the need for additional infrastructure to execute background callbacks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels