Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
troex opened this issue Jul 16, 2012 · 1 comment
Closed

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

troex opened this issue Jul 16, 2012 · 1 comment

Comments

@troex
Copy link

troex commented Jul 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
Copy link
Author

troex commented Jul 16, 2012

related to #296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants