aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/jobs/active_storage/purge_job.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/app/jobs/active_storage/purge_job.rb')
-rw-r--r--activestorage/app/jobs/active_storage/purge_job.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activestorage/app/jobs/active_storage/purge_job.rb b/activestorage/app/jobs/active_storage/purge_job.rb
index 98874d2250..2604977bf1 100644
--- a/activestorage/app/jobs/active_storage/purge_job.rb
+++ b/activestorage/app/jobs/active_storage/purge_job.rb
@@ -2,8 +2,8 @@
# Provides asynchronous purging of ActiveStorage::Blob records via ActiveStorage::Blob#purge_later.
class ActiveStorage::PurgeJob < ActiveStorage::BaseJob
- # FIXME: Limit this to a custom ActiveStorage error
- retry_on StandardError
+ discard_on ActiveRecord::RecordNotFound
+ retry_on ActiveRecord::Deadlocked, attempts: 10, wait: :exponentially_longer
def perform(blob)
blob.purge