Sha256: e91637705be47691662649fb0e908045c87d2b91e0073583847e791d5abdc8ad
Contents?: true
Size: 546 Bytes
Versions: 2
Compression:
Stored size: 546 Bytes
Contents
class ResquePaperclipJob @queue = :paperclip def self.perform(instance_klass, instance_id, attachment_name) instance = instance_klass.constantize.find(instance_id) process_job(instance, attachment_name) do instance.send(attachment_name).reprocess! instance.send("#{attachment_name}_processed!") end end private def self.process_job(instance, attachment_name) instance.send(attachment_name).job_is_processing = true yield instance.send(attachment_name).job_is_processing = false end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
delayed_paperclip-0.6.5 | lib/delayed/jobs/resque_paperclip_job.rb |
delayed_paperclip-0.6.4 | lib/delayed/jobs/resque_paperclip_job.rb |