Sha256: d1ec79c4acfb9ed590e52758438fc20240532a83a308c8ea6605f438a3697245
Contents?: true
Size: 470 Bytes
Versions: 2
Compression:
Stored size: 470 Bytes
Contents
class DelayedPaperclipJob < Struct.new(:instance_klass, :instance_id, :attachment_name) def perform instance = instance_klass.constantize.find(instance_id) instance.send("#{attachment_name}_processed!") begin instance.send(attachment_name).reprocess! rescue Exception => e instance.send("#{attachment_name}_processing!", :save => true) # DJ will now pickup this error and do its error handling raise(e) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
delayed_paperclip-0.6.3 | lib/delayed/jobs/delayed_paperclip_job.rb |
delayed_paperclip-0.6.2 | lib/delayed/jobs/delayed_paperclip_job.rb |