Sha256: e30d679a46eade26730fec807880b213e9d5db7479c9c48ebe956457c87eb595

Contents?: true

Size: 306 Bytes

Versions: 43

Compression:

Stored size: 306 Bytes

Contents

# frozen_string_literal: true

# Provides asynchronous purging of ActiveStorage::Blob records via ActiveStorage::Blob#purge_later.
class ActiveStorage::PurgeJob < ActiveStorage::BaseJob
  discard_on ActiveRecord::RecordNotFound

  def perform(blob)
    begin
      blob&.purge
    rescue
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
better_record-0.17.0 app/jobs/active_storage/purge_job.rb
better_record-0.16.1 app/jobs/active_storage/purge_job.rb
better_record-0.16.0 app/jobs/active_storage/purge_job.rb