Skip to content
This repository

psych_ext.rb#L101 breaks restoring of deleted serialized objects #409

Open
troex opened this Issue July 16, 2012 · 1 comment

1 participant

Troex Nevelin
Troex Nevelin
troex commented July 16, 2012

https://github.com/collectiveidea/delayed_job/blob/master/lib/delayed/psych_ext.rb#L101 I'm really worried and I think it breaks logic in rails outside from delayed_job.

I store deleted objects as serialized values in another object, the problem when I try to access this object rails fails with Delayed::DeserializationError: Delayed::DeserializationError:

delayed_job-3.0.3/lib/delayed/psych_ext.rb:108→ rescue in visit_Psych_Nodes_Mapping_with_class
delayed_job-3.0.3/lib/delayed/psych_ext.rb:101→ visit_Psych_Nodes_Mapping_with_class

delayed_job redefined the psych method and tries to find the record, but it definitely will fail because the record is deleted and raises the error instead of restoring it.

ruby 1.9.3p194
rails 3.2.6

Troex Nevelin
troex commented July 16, 2012

related to #296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.