From d50679f4eefde1aca1ab71ba3c0109739cfdff3f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 22 Jul 2017 09:47:24 -0500 Subject: Move models and jobs to the app setup Follow engine conventions more closely --- app/jobs/active_storage/purge_job.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 app/jobs/active_storage/purge_job.rb (limited to 'app/jobs') 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 -- cgit v1.2.3