Commit fb7c62b8 authored by Mark Chao's avatar Mark Chao

Increase batch size to cut down time

parent 05f868b9
...@@ -4,7 +4,7 @@ class MigrateProjectApprovers < ActiveRecord::Migration[5.0] ...@@ -4,7 +4,7 @@ class MigrateProjectApprovers < ActiveRecord::Migration[5.0]
include Gitlab::Database::MigrationHelpers include Gitlab::Database::MigrationHelpers
DOWNTIME = false DOWNTIME = false
BATCH_SIZE = 1000 BATCH_SIZE = 3000
class MergeRequest < ActiveRecord::Base class MergeRequest < ActiveRecord::Base
include ::EachBatch include ::EachBatch
...@@ -24,7 +24,7 @@ class MigrateProjectApprovers < ActiveRecord::Migration[5.0] ...@@ -24,7 +24,7 @@ class MigrateProjectApprovers < ActiveRecord::Migration[5.0]
Gitlab::BackgroundMigration::MigrateApproverToApprovalRules.new.perform('Project', project_id) Gitlab::BackgroundMigration::MigrateApproverToApprovalRules.new.perform('Project', project_id)
end end
bulk_queue_background_migration_jobs_by_range(MergeRequest, 'MigrateApproverToApprovalRulesInBatch') bulk_queue_background_migration_jobs_by_range(MergeRequest, 'MigrateApproverToApprovalRulesInBatch', batch_size: BATCH_SIZE)
check_time = Gitlab::BackgroundMigration::MigrateApproverToApprovalRulesCheckProgress::RESCHEDULE_DELAY check_time = Gitlab::BackgroundMigration::MigrateApproverToApprovalRulesCheckProgress::RESCHEDULE_DELAY
BackgroundMigrationWorker.bulk_perform_in(check_time, [['MigrateApproverToApprovalRulesCheckProgress']]) BackgroundMigrationWorker.bulk_perform_in(check_time, [['MigrateApproverToApprovalRulesCheckProgress']])
......
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