diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-11-23 15:37:32 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-11-23 15:37:32 +0300 |
commit | 3dfbfa4e4f2ce962660dc534ac7a8c670049b506 (patch) | |
tree | f912819b85c0d680a1f42913576cb7bb642ea38b /db | |
parent | 1143411ae848fade4050d3d8319ba5ed88a1b1da (diff) |
Adjust batch size for migrating runners token
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20181121111200_schedule_runners_token_encryption.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/db/post_migrate/20181121111200_schedule_runners_token_encryption.rb b/db/post_migrate/20181121111200_schedule_runners_token_encryption.rb index 3a59217f07a..753e052f7a7 100644 --- a/db/post_migrate/20181121111200_schedule_runners_token_encryption.rb +++ b/db/post_migrate/20181121111200_schedule_runners_token_encryption.rb @@ -5,7 +5,7 @@ class ScheduleRunnersTokenEncryption < ActiveRecord::Migration DOWNTIME = false BATCH_SIZE = 10000 - RANGE_SIZE = 100 + RANGE_SIZE = 2000 MIGRATION = 'EncryptRunnersTokens' MODELS = [ @@ -20,7 +20,7 @@ class ScheduleRunnersTokenEncryption < ActiveRecord::Migration def up MODELS.each do |model| model.each_batch(of: BATCH_SIZE) do |relation, index| - delay = index * 2.minutes + delay = index * 4.minutes relation.each_batch(of: RANGE_SIZE) do |relation| range = relation.pluck('MIN(id)', 'MAX(id)').first |