-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kombu.exceptions.EncodeError when trying to execute Job #663
Comments
Oof this one is ugly. I am able to reliably reproduce it and attempts to get nested serialization of model objects using JSON and the
This is I can completely obviate this error scenario entirely by hard-coding these settings in CELERY_ACCEPT_CONTENT = {"pickle"}
CELERY_RESULT_ACCEPT_CONTENT = CELERY_ACCEPT_CONTENT
CELERY_TASK_SERIALIZER = "pickle"
CELERY_RESULT_SERIALIZER = "pickle" This forces Celery to use Pickle. This isn't necessarily desirable, but I think we have two options:
|
Given the current feature set in 1.1, pickle would work fine. However the switch to json is driven by the scheduler because args and kwargs have to be stored in the DB. So in a pinch, to get 1.1 we could switch it back to pickle and then figure out what the issue is. |
Added a `serialize_data()` method to `Job` which handles conversion of `MultiObjectVar` and `ObjectVar` to `pk` values. Then within the job execution we use `deserialize_data()` to convert back to actual querysets and model instances, respectively. Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Environment
Steps to Reproduce
.py
file$NAUTOBOT_ROOT/jobs/
New Branch
jobExpected Behavior
Job to execute
Observed Behavior
Got the following message in the UI:
Server Error
There was a problem with your request. Please contact an administrator.
The complete exception is provided below:
The text was updated successfully, but these errors were encountered: