Skip to content

Commit

Permalink
use correct args to reschedule the monitor job
Browse files Browse the repository at this point in the history
  • Loading branch information
camallen committed Feb 23, 2023
1 parent a66fff2 commit c55e6c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/sidekiq/training_job_monitor_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def perform(training_job_id, context_id)
PredictionManifestExportJob.perform_async(context.id)
else
# reschedule this job to run again in 1 minute
TrainingJobMonitorJob.perform_in(MONITOR_JOB_RESCHEDULE_DELAY.minute, training_job.id)
TrainingJobMonitorJob.perform_in(MONITOR_JOB_RESCHEDULE_DELAY.minute, training_job.id, context.id)
end
end
end
2 changes: 1 addition & 1 deletion spec/sidekiq/training_job_monitor_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
allow(training_job_monitor_result).to receive(:completed?).and_return(false)
allow(described_class).to receive(:perform_in)
job.perform(training_job.id, context.id)
expect(described_class).to have_received(:perform_in).with(1.minute, training_job_monitor_result.id)
expect(described_class).to have_received(:perform_in).with(1.minute, training_job_monitor_result.id, context.id)
end

context 'when the monitor job returns a completed job' do
Expand Down

0 comments on commit c55e6c7

Please sign in to comment.