aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/jobs/active_storage
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/app/jobs/active_storage')
-rw-r--r--activestorage/app/jobs/active_storage/purge_job.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activestorage/app/jobs/active_storage/purge_job.rb b/activestorage/app/jobs/active_storage/purge_job.rb
index 95ae7d0c30..fa15e0451d 100644
--- a/activestorage/app/jobs/active_storage/purge_job.rb
+++ b/activestorage/app/jobs/active_storage/purge_job.rb
@@ -2,6 +2,8 @@
# 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