Closed Kenchir closed 1 month ago
Structure above? What structure? I don't see anything.
Also, why are you reporting a pickling failure if the pickling of a bound method (ie. the self
argument), fails?
Yes. It fails due to the self argument. How is that fixed
Structure above? What structure? I don't see anything.
I have updated it
The easiest way to fix this would be to obtain the worker dynamically in the target function code, instead of being passed to it implicitly via the self
argument. If you can make it a global, that would be one solution.
Things to check first
[X] I have checked that my issue does not already have a solution in the FAQ
[X] I have searched the existing issues and didn't find my bug already reported there
[X] I have checked that my bug is still present in the latest release
Version
3.10.4
What happened?
I was adding a job to my schedule. Jobstore is PostgresQL The function added is an instance method. The error comes when the function is being pickled.
It fails to store the self argument
'args': (<package.sub_package.file_name.ClassName object at 0x1062f1f40>,),
Note that ClassName also inherits some other ClassX
How can we reproduce the bug?
scheduling.py
worker.py
Creating a project with structure above can re-produce the error.