What is the purpose of serialized_params
?
#1238
-
I noticed the This made me wonder: what's the purpose of I was hoping to retroactively change the queue of a bunch of jobs that are already enqueued. But seeing the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The column GoodJob itself uses some of those values during queue operations or to make querying via the Dashboard easier (it's not easy or performant to reach into that serialized data). You're correct that it is duplicated. It's totally fine to change the GoodJob columnar values directly, because that is what GoodJob itself uses for queue operations (e.g. changing queue name or priority or scheduled_at). I guess when the job is performed the values Active Job has will not match the values used by GoodJob e.g. if you accessed good_job/app/models/good_job/base_execution.rb Lines 114 to 121 in 131e0cc |
Beta Was this translation helpful? Give feedback.
The column
serialized_params
in the database is the serialization of a job that Active Job produces. When enqueuing a job, Active Job expects the job to be serialized out to that hash to be stored in the job backend (in this case, GoodJob), and then when executing the job, the backend passes that hash back into Active Job which deserializes/hydrates it back into a job object so Active Job can perform it.GoodJob itself uses some of those values during queue operations or to make querying via the Dashboard easier (it's not easy or performant to reach into that serialized data). You're correct that it is duplicated.
It's totally fine to change the GoodJob columnar values directly, because t…