Closed mikewagz closed 7 years ago
The queue often has failed jobs resulting from Record Not Found exceptions. Is there a way to gracefully handle these, either by canceling the job or rescuing the exception and allowing the job to succeed?
Couldn't find Photo with 'id'=62503 /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.0/lib/active_record/relation/finder_methods.rb:357:in `raise_record_not_found_exception!' /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.0/lib/active_record/relation/finder_methods.rb:477:in `find_one' /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.0/lib/active_record/relation/finder_methods.rb:456:in `find_with_ids' /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.0/lib/active_record/relation/finder_methods.rb:66:in `find' /app/vendor/bundle/ruby/2.3.0/gems/delayed_paperclip-3.0.1/lib/delayed_paperclip.rb:26:in `process_job' /app/vendor/bundle/ruby/2.3.0/gems/delayed_paperclip-3.0.1/lib/delayed_paperclip/process_job.rb:11:in `perform' /app/vendor/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/execution.rb:34:in `block in perform_now' ...
This seems to happen when an object is deleted before the queue gets to the job.
Fix by https://github.com/jrgifford/delayed_paperclip/pull/206/
The queue often has failed jobs resulting from Record Not Found exceptions. Is there a way to gracefully handle these, either by canceling the job or rescuing the exception and allowing the job to succeed?