aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/jobs
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-07-20 11:18:37 -0400
committerGeorge Claghorn <george@basecamp.com>2018-07-20 11:18:37 -0400
commit6c45b04a7399bb629bf17319dc3519a061d4d7a0 (patch)
treeb4944b914623620a973389508de600c8f20ac743 /activestorage/app/jobs
parent562ec3dcd1a353eb5c20f130acc71c0707f7ff50 (diff)
downloadrails-6c45b04a7399bb629bf17319dc3519a061d4d7a0.tar.gz
rails-6c45b04a7399bb629bf17319dc3519a061d4d7a0.tar.bz2
rails-6c45b04a7399bb629bf17319dc3519a061d4d7a0.zip
Discard ActiveStorage::PurgeJobs on ActiveRecord::InvalidForeignKey
Diffstat (limited to 'activestorage/app/jobs')
-rw-r--r--activestorage/app/jobs/active_storage/purge_job.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/jobs/active_storage/purge_job.rb b/activestorage/app/jobs/active_storage/purge_job.rb
index fa15e0451d..b021b5f2d0 100644
--- a/activestorage/app/jobs/active_storage/purge_job.rb
+++ b/activestorage/app/jobs/active_storage/purge_job.rb
@@ -2,7 +2,7 @@
# Provides asynchronous purging of ActiveStorage::Blob records via ActiveStorage::Blob#purge_later.
class ActiveStorage::PurgeJob < ActiveStorage::BaseJob
- discard_on ActiveRecord::RecordNotFound
+ discard_on ActiveRecord::RecordNotFound, ActiveRecord::InvalidForeignKey
def perform(blob)
blob.purge