Sha256: 8a394b870bb575feb751e6a85aae6cfbf6b5f578234b380b7f05f1d13745f0c3

Contents?: true

Size: 354 Bytes

Versions: 4

Compression:

Stored size: 354 Bytes

Contents

# frozen_string_literal: true

module Paperweight
  # Queues post processing.
  class PostProcessJob < ActiveJob::Base
    queue_as :default

    discard_on ActiveJob::DeserializationError

    def perform(model, name, url)
      model.update!(
        name => Download.new.download(url),
        :"#{name}_processing" => false
      )
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
paperweight-0.2.0 lib/paperweight/post_process_job.rb
paperweight-0.1.2 lib/paperweight/post_process_job.rb
paperweight-0.1.1 lib/paperweight/post_process_job.rb
paperweight-0.1.0 lib/paperweight/post_process_job.rb