Skip to content

Commit 1518701

Browse files
committed
Reduce PatientStatusUpdater batch size to improve performance
While working on needs-consent sub-statuses and running data-replication performance tests, we found that large batches were slow to process, while a smaller batch size of 1000 completed significantly faster.
1 parent b3527ad commit 1518701

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/lib/patient_status_updater.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def update_programme_statuses!
5151
:vaccination_records,
5252
:parents
5353
)
54-
.find_in_batches(batch_size: 10_000) do |batch|
54+
.find_in_batches do |batch|
5555
batch.each(&:assign)
5656

5757
Patient::ProgrammeStatus.import!(

0 commit comments

Comments
 (0)