How to resolve deserialization error in delayed job?

前端 未结 7 1981
遇见更好的自我
遇见更好的自我 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:01

    Michiel is right. Look at your handler field for objects like "!ruby/ActiveRecord:YourClassName"

    Then check if objects can be retrieved via the primary key

    From the console you can also test this out by doing something like:

    # first job in your delayed queue
    YAML.load(Delayed::Backend::ActiveRecord::Job.first.handler)
    

提交回复
热议问题