Skip to content

Commit

Permalink
Managing case unknown in MalwareScanRetrieveStateJob
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelfaure committed Oct 17, 2024
1 parent 6ec61c9 commit df7c515
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/jobs/malware_scan_retrieve_state_job.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class MalwareScanRetrieveStateJob < ApplicationJob
include KeepTrackOfJobAttempts

RETRY_WAIT_TIME = 1.minute
RETRIES = 60

Expand Down
3 changes: 2 additions & 1 deletion spec/jobs/malware_scan_retrieve_state_job_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
RSpec.describe MalwareScanRetrieveStateJob do
subject { described_class.new(uuid).perform_now }
subject { job_instance.perform_now }

let(:job_instance) { described_class.new(uuid) }
let(:uuid) { SecureRandom.uuid }
let(:api_client_double) { instance_double(JeCliqueOuPasAPIClient) }
let(:malware_scan) { MalwareScan.find_by(uuid:) }
Expand Down

0 comments on commit df7c515

Please sign in to comment.