summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb2
-rw-r--r--spec/migrations/migrate_stage_id_reference_in_background_spec.rb8
2 files changed, 5 insertions, 5 deletions
diff --git a/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb b/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb
index 30849ea1361..ebec4cb6bb7 100644
--- a/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb
+++ b/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb
@@ -16,7 +16,7 @@ class MigrateStageIdReferenceInBackground < ActiveRecord::Migration
Build.where(stage_id: nil).in_batches(of: BATCH_SIZE) do |relation|
jobs = relation.pluck(:id).map { |id| [MIGRATION, [id]] }
- schedule = index * 5.minutes
+ schedule = index * 2.minutes
index += 1
BackgroundMigrationWorker.perform_bulk_in(schedule, jobs)
diff --git a/spec/migrations/migrate_stage_id_reference_in_background_spec.rb b/spec/migrations/migrate_stage_id_reference_in_background_spec.rb
index 2e5504c849d..a32a7fceb68 100644
--- a/spec/migrations/migrate_stage_id_reference_in_background_spec.rb
+++ b/spec/migrations/migrate_stage_id_reference_in_background_spec.rb
@@ -47,10 +47,10 @@ describe MigrateStageIdReferenceInBackground, :migration, :sidekiq do
Timecop.freeze do
migrate!
- expect(described_class::MIGRATION).to be_scheduled_migration(5.minutes, 1)
- expect(described_class::MIGRATION).to be_scheduled_migration(5.minutes, 2)
- expect(described_class::MIGRATION).to be_scheduled_migration(10.minutes, 3)
- expect(described_class::MIGRATION).to be_scheduled_migration(10.minutes, 4)
+ expect(described_class::MIGRATION).to be_scheduled_migration(2.minutes, 1)
+ expect(described_class::MIGRATION).to be_scheduled_migration(2.minutes, 2)
+ expect(described_class::MIGRATION).to be_scheduled_migration(4.minutes, 3)
+ expect(described_class::MIGRATION).to be_scheduled_migration(4.minutes, 4)
expect(BackgroundMigrationWorker.jobs.size).to eq 5
end
end