lib/paperweight/post_process_job.rb in paperweight-1.1.0 vs lib/paperweight/post_process_job.rb in paperweight-1.2.0

- old
+ new

@@ -5,9 +5,15 @@ class PostProcessJob < ActiveJob::Base queue_as :default discard_on ActiveJob::DeserializationError + rescue_from Download::Error do |error| + raise error if executions >= Paperweight.config.download_attempts + + retry_job(wait: (executions**4) + 2) + end + def perform(model, name) name = AttachmentName.new(name) image_url = model.public_send(name.processing) return unless image_url