collectiveidea/delayed_job_active_record

upgrade to rails 5.2 causes errors with existing jobs

modosc opened this issue · 1 comments

after we upgraded from 5.1 -> 5.2 we started seeing these errors for jobs that were created under 5.1:

 Job has failed and won't be retried anymore: Job failed to load: undefined method `allocate' for "ActiveModel::Attribute::FromDatabase":String. Handler:

ActiveRecord objects serialized under 5.1 can't be deserialized under 5.2 because rails changed the ActiveRecord object structure. You will need to manually recover and re-queue any jobs serializing AR objects from before your deploy. This goes for anything that was serializing AR objects to YAML and back, not just delayed job.