jobs: also retry native ActiveStorage's jobs on transient errors

This commit is contained in:
Pierre de La Morinerie 2021-04-29 13:57:32 +02:00
parent 684af77e35
commit fbfe5c3817
2 changed files with 9 additions and 0 deletions

View file

@ -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

View file

@ -0,0 +1,3 @@
describe ActiveStorage::BaseJob do
it_behaves_like 'a job retrying transient errors'
end