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
The task should be instantiated for each run. State should not be leaking between tasks.
Actual Behavior
I have a list defined in my __init__ method of my task. As the task runs things are appended to the list. I'm noticing that the class is only instantiated once. The list attached to self seems to persist between jobs. This seems very unintuitive and seems like it could lead to concurrency issues with a thread based worker.
Checklist
main
branch of Celery.contribution guide
on reporting bugs.
for similar or identical bug reports.
for existing proposed fixes.
to find out if the bug was already fixed in the main branch.
in this issue (If there are none, check this box anyway).
Mandatory Debugging Information
celery -A proj report
in the issue.(if you are not able to do this, then at least specify the Celery
version affected).
main
branch of Celery.pip freeze
in the issue.to reproduce this bug.
Optional Debugging Information
and/or implementation.
result backend.
broker and/or result backend.
ETA/Countdown & rate limits disabled.
and/or upgrading Celery and its dependencies.
Related Issues and Possible Duplicates
Related Issues
Possible Duplicates
Environment & Settings
5.3.6 (emerald-rush)
Celery version:
celery report
Output:Steps to Reproduce
Required Dependencies
Python Packages
pip freeze
Output:Other Dependencies
N/A
Minimally Reproducible Test Case
Expected Behavior
The task should be instantiated for each run. State should not be leaking between tasks.
Actual Behavior
I have a list defined in my
__init__
method of my task. As the task runs things are appended to the list. I'm noticing that the class is only instantiated once. The list attached toself
seems to persist between jobs. This seems very unintuitive and seems like it could lead to concurrency issues with a thread based worker.Created this post and got no replies: #8958
The text was updated successfully, but these errors were encountered: