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
This is more of a bug report but it said to make a discussion first and I was wondering if anyone knew why this is happening.
I have a list defined in my __init__ method. 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. is there any way around this?
I am using app.register_task to add the task which creates a single instance when it is passed with the task. I tried doing something like app.task(name=cls().name, bind=True)(cls) and it just calls the __init__ method and never calls run.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is more of a bug report but it said to make a discussion first and I was wondering if anyone knew why this is happening.
I have a list defined in my
__init__
method. 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. is there any way around this?I am using
app.register_task
to add the task which creates a single instance when it is passed with the task. I tried doing something likeapp.task(name=cls().name, bind=True)(cls)
and it just calls the__init__
method and never callsrun
.Beta Was this translation helpful? Give feedback.
All reactions