aboutsummaryrefslogblamecommitdiffstats
path: root/activestorage/app/jobs/active_storage/purge_job.rb
blob: fa15e0451dcc128a340b1e78993c6a6a94a1acc0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                             
                                                                                                   
                                                      
                                         
 

                   

     
# 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)
    blob.purge
  end
end