Skip to content

Commit

Permalink
Merge pull request #9477 from DFE-Digital/dd/move-migrations-to-worke…
Browse files Browse the repository at this point in the history
…r-jobs-to-tackle-each-data-export-in-isolation

Only select the Data Export ID to enqueue the migration jobs
  • Loading branch information
Nitemaeric authored Jun 18, 2024
2 parents 3b7037b + 1bf7094 commit 249e9e0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class MigrateDataExportDataToFile
MANUAL_RUN = true

def change
BatchDelivery.new(relation: DataExport.all, stagger_over: 4.hours, batch_size: 10).each do |next_batch_time, data_exports|
BatchDelivery.new(relation: DataExport.select(:id), stagger_over: 4.hours, batch_size: 10).each do |next_batch_time, data_exports|
data_exports.each do |data_export|
DataExportFileMigrationWorker.perform_at(next_batch_time, data_export.id)
end
Expand Down

0 comments on commit 249e9e0

Please sign in to comment.