Sha256: 5a4f48ce1b6c451cc62836e85083c461545c7300d4d794585fd4bd26e1c54377

Contents?: true

Size: 473 Bytes

Versions: 26

Compression:

Stored size: 473 Bytes

Contents

# frozen_string_literal: true

class ActiveStorage::PreviewImageJob < ActiveStorage::BaseJob
  queue_as { ActiveStorage.queues[:preview_image] }

  discard_on ActiveRecord::RecordNotFound, ActiveStorage::UnrepresentableError
  retry_on ActiveStorage::IntegrityError, attempts: 10, wait: :polynomially_longer

  def perform(blob, variations)
    blob.preview({}).processed

    variations.each do |transformations|
      blob.preprocessed(transformations)
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
activestorage-8.0.1 app/jobs/active_storage/preview_image_job.rb
activestorage-8.0.0.1 app/jobs/active_storage/preview_image_job.rb
activestorage-7.2.2.1 app/jobs/active_storage/preview_image_job.rb
activestorage-7.1.5.1 app/jobs/active_storage/preview_image_job.rb
activestorage-8.0.0 app/jobs/active_storage/preview_image_job.rb
activestorage-7.2.2 app/jobs/active_storage/preview_image_job.rb
activestorage-7.1.5 app/jobs/active_storage/preview_image_job.rb
activestorage-8.0.0.rc2 app/jobs/active_storage/preview_image_job.rb
activestorage-7.2.1.2 app/jobs/active_storage/preview_image_job.rb
activestorage-7.1.4.2 app/jobs/active_storage/preview_image_job.rb
activestorage-8.0.0.rc1 app/jobs/active_storage/preview_image_job.rb
activestorage-7.2.1.1 app/jobs/active_storage/preview_image_job.rb
activestorage-7.1.4.1 app/jobs/active_storage/preview_image_job.rb
activestorage-8.0.0.beta1 app/jobs/active_storage/preview_image_job.rb
omg-activestorage-8.0.0.alpha9 app/jobs/active_storage/preview_image_job.rb
omg-activestorage-8.0.0.alpha8 app/jobs/active_storage/preview_image_job.rb
omg-activestorage-8.0.0.alpha7 app/jobs/active_storage/preview_image_job.rb
omg-activestorage-8.0.0.alpha4 app/jobs/active_storage/preview_image_job.rb
omg-activestorage-8.0.0.alpha3 app/jobs/active_storage/preview_image_job.rb
activestorage-7.1.4 app/jobs/active_storage/preview_image_job.rb