How to resolve deserialization error in delayed job?

前端 未结 7 1985
遇见更好的自我
遇见更好的自我 2021-02-06 22:38

I am trying to use DelayedJob and the job is failing, giving the following error in the database:

{Delayed::DeserializationError
/Library/Ruby/Gems/1.8/gems/delayed_j         


        
7条回答
  •  你的背包
    2021-02-06 23:18

    Today, I also suffered through this error and after doing hectic analysis found:

    1. delayed_job converts methods & parameters to YAML format and stores it into database
    2. It can be found using select * from delayed_jobs;
    3. deserialization error occurs when delayed_job is not able to deserialize it.

    Probable causes can be:

    1. args["xyz"] used before calling delayed_job & inside worker using it as args[:xyz]
    2. Sometimes extra arguments passed along with object to delayed_job that time delayed_job fails to build object as it is indifferent access.

    I Hope this will help!

提交回复
热议问题