[BUG] Celery Background Callback Manager fails with Non-Key/Value-Backends
@datenzauberai đang làm issue này rồi.
Từ ngày 8/4/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
Backends that that implement BaseKeyValueStoreBackend might also fail, when the parameters passed to set and get do not comply with the backend's requirements (e.g. the FilesystemBackend expects a byte-like object for the key resulting in an error similar to TypeError: sequence item 1: expected a bytes-like object, str found, also see https://github.com/plotly/dash/issues/3116).
Expected behavior
The CeleryManager should either
- support all Celery backends by using
get_resultandstore_resultfromBaseBackendinstead ofgetandsetand using byte-like objects for keys or - make the restriction more explicit by additional documentation and erroring early on when the configured backend does not implement
BaseKeyValueStoreBackendor is otherwise not supported.
Especially the DatabaseBackend and FilesystemBackend would be accessible options without the need for additional infrastructure to execute background callbacks.
- Ngôn ngữ chính
- Python
- Star
- 24.4k
- Fork
- 2.3k
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 19
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của plotly/dash
-
good first issue P3 size: 1 task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
enhancement P2 size: 5
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
-
enhancement P3 size: 10+
-
P2 size: 1 task
-
enhancement P3 size: 1
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
canonical/paas-charm#368 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
addition to tracking list Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
StevenBlack/hosts#3256 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
qualcomm/qai-appbuilder#275 ·