fix(missing-antivirus-job): retry when backend is unavailable
This commit is contained in:
parent
08666cd852
commit
f8f14830a6
1 changed files with 1 additions and 4 deletions
|
@ -3,10 +3,7 @@ class Cron::FixMissingAntivirusAnalysisJob < Cron::CronJob
|
|||
|
||||
def perform
|
||||
ActiveStorage::Blob.where(virus_scan_result: ActiveStorage::VirusScanner::PENDING).find_each do |blob|
|
||||
begin
|
||||
VirusScannerJob.perform_now(blob)
|
||||
rescue ActiveStorage::IntegrityError
|
||||
end
|
||||
VirusScannerJob.perform_later(blob)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue