diff --git a/app/jobs/update_malware_scan_result_job.rb b/app/jobs/update_malware_scan_result_job.rb index b34bb16c26..9b46b7c059 100644 --- a/app/jobs/update_malware_scan_result_job.rb +++ b/app/jobs/update_malware_scan_result_job.rb @@ -6,8 +6,14 @@ class UpdateMalwareScanResultJob < ApplicationJob def perform(upload) FetchMalwareScanResult.call(upload:) - # This will ensure the job is automatically retried. - raise StillPending if upload.malware_scan_pending? + if upload.malware_scan_pending? + # This will ensure the job is automatically retried. + raise StillPending + else + ApplicationFormSectionStatusUpdater.call( + application_form: upload.application_form, + ) + end end class StillPending < StandardError