Skip to content

Commit 9e21c6b

Browse files
authored
Allow fractional wait time between PDS jobs (#3375)
This allows us to specify the wait time between PDS jobs in fractional seconds to give us more flexibility in terms of controlling this.
2 parents dcff0e3 + 7a7e4de commit 9e21c6b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/jobs/bulk_update_patients_from_pds_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def perform
1111
return unless Settings.pds.enqueue_bulk_updates
1212

1313
patients = Patient.with_nhs_number.not_invalidated.not_deceased
14-
wait_between_jobs = Settings.pds.wait_between_jobs.to_i
14+
wait_between_jobs = Settings.pds.wait_between_jobs.to_f
1515

1616
GoodJob::Bulk.enqueue do
1717
patients

app/models/concerns/csv_importable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def process!
148148
def update_from_pds
149149
return unless Settings.pds.enqueue_bulk_updates
150150

151-
wait_between_jobs = Settings.pds.wait_between_jobs.to_i
151+
wait_between_jobs = Settings.pds.wait_between_jobs.to_f
152152

153153
GoodJob::Bulk.enqueue do
154154
patients.find_each.with_index do |patient, index|

config/settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ nhs_api:
7575
pds:
7676
enqueue_bulk_updates: true
7777
raise_unknown_gp_practice: true
78-
wait_between_jobs: 2
78+
wait_between_jobs: 2.0
7979

8080
splunk:
8181
enabled: true

0 commit comments

Comments
 (0)