diff options
Diffstat (limited to 'app/jobs')
-rw-r--r-- | app/jobs/active_storage/purge_job.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/jobs/active_storage/purge_job.rb b/app/jobs/active_storage/purge_job.rb new file mode 100644 index 0000000000..b59d3687f8 --- /dev/null +++ b/app/jobs/active_storage/purge_job.rb @@ -0,0 +1,10 @@ +require "active_job" + +class ActiveStorage::PurgeJob < ActiveJob::Base + # FIXME: Limit this to a custom ActiveStorage error + retry_on StandardError + + def perform(attachment_or_blob) + attachment_or_blob.purge + end +end |