summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-23 13:37:32 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-23 13:37:32 +0100
commit3dfbfa4e4f2ce962660dc534ac7a8c670049b506 (patch)
treef912819b85c0d680a1f42913576cb7bb642ea38b /db
parent1143411ae848fade4050d3d8319ba5ed88a1b1da (diff)
downloadgitlab-ce-3dfbfa4e4f2ce962660dc534ac7a8c670049b506.tar.gz
Adjust batch size for migrating runners token
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20181121111200_schedule_runners_token_encryption.rb4
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