Sha256: 075e24ab60a96fb4e9b96a98e262e0458df4c7beca413c67c9e25275ab054561

Contents?: true

Size: 196 Bytes

Versions: 7

Compression:

Stored size: 196 Bytes

Contents

require 'sidekiq'

class ActiveStorage::PurgeAttachmentWorker
  include Sidekiq::Worker

  def perform(attachment_id)
    ActiveStorage::Attachment.where(id: attachment_id).first&.purge
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
activestorage_legacy-0.2.1 app/jobs/active_storage/purge_attachment_worker.rb
activestorage_legacy-0.2.0 app/jobs/active_storage/purge_attachment_worker.rb
activestorage_legacy-0.1.3 app/jobs/active_storage/purge_attachment_worker.rb
activestorage_legacy-0.1.2 app/jobs/active_storage/purge_attachment_worker.rb
activestorage_legacy-0.1.1 app/jobs/active_storage/purge_attachment_worker.rb
activestorage_legacy-0.1.1.alpha app/jobs/active_storage/purge_attachment_worker.rb
activestorage_legacy-0.1 app/jobs/active_storage/purge_attachment_worker.rb