jobs: also retry native ActiveStorage's jobs on transient errors
This commit is contained in:
parent
684af77e35
commit
fbfe5c3817
2 changed files with 9 additions and 0 deletions
|
@ -14,6 +14,12 @@ ActiveSupport.on_load(:active_storage_attachment) do
|
|||
include AttachmentVirusScannerConcern
|
||||
end
|
||||
|
||||
Rails.application.reloader.to_prepare do
|
||||
class ActiveStorage::BaseJob
|
||||
include ActiveJob::RetryOnTransientErrors
|
||||
end
|
||||
end
|
||||
|
||||
# When an OpenStack service is initialized it makes a request to fetch
|
||||
# `publicURL` to use for all operations. We intercept the method that reads
|
||||
# this url and replace the host with DS_Proxy host. This way all the operation
|
||||
|
|
3
spec/jobs/active_storage/base_job_spec.rb
Normal file
3
spec/jobs/active_storage/base_job_spec.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
describe ActiveStorage::BaseJob do
|
||||
it_behaves_like 'a job retrying transient errors'
|
||||
end
|
Loading…
Reference in a new issue