Open tekumara opened 1 year ago
As a workaround, switching the task execution to thread
or async
(rather than default of process
) avoids this problem, presumably because pickling doesn't need to happen.
Thanks for reporting this! These pickling issues are often hard to find as they are often OS-dependent or come up in special situations.
I think an unpicklable attribute from Rocketry's session leaks to the process for some reason.
If interested, the task sort of prunes the session:
If I remember correctly, the process task needs some config options from the session thus most of the session configs are pickled. I tried to make it so that it would throw away only known unpicklable attributes, but I am not sure if it should work the other way around (including only the ones we know we can pickle).
Another could be the function but that function looks pretty standard.
How are your app configurations, and do you perhaps set some attributes to the session?
Thanks for the explanation!
This is the only config I have:
app = Rocketry(
# see https://rocketry.readthedocs.io/en/stable/handbooks/config.html
config={
"task_execution": "process",
}
)
Interestingly, if I remove that config and just use app = Rocketry()
it works even though I thought that process
was the default.
Describe the bug
On the second run of my task, the following log line triggers continuously in a loop forever:
The log line is the same each time, except for the Session object reference.
On CTRL+C the trace back contains:
My task:
Desktop (please complete the following information):
Additional context
rocketry 2.5.1