Commit a841ba3d authored by Jarka Košanová's avatar Jarka Košanová

Fix scheduling migration ordering epics & issues

parent 629dda38
...@@ -24,7 +24,7 @@ class ScheduleEpicIssuesAfterEpicsMove < ActiveRecord::Migration[5.2] ...@@ -24,7 +24,7 @@ class ScheduleEpicIssuesAfterEpicsMove < ActiveRecord::Migration[5.2]
Epic.each_batch(of: BATCH_SIZE) do |batch, index| Epic.each_batch(of: BATCH_SIZE) do |batch, index|
range = batch.pluck('MIN(id)', 'MAX(id)').first range = batch.pluck('MIN(id)', 'MAX(id)').first
delay = index * interval delay = index * INTERVAL
BackgroundMigrationWorker.perform_in(delay, MIGRATION, *range) BackgroundMigrationWorker.perform_in(delay, MIGRATION, *range)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment