blob: ffdb7f80f0ea17f8c88043568d9cd3d1698af7b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# frozen_string_literal: true
class ScheduleFixFirstMentionedInCommitAtJob < Gitlab::Database::Migration[1.0]
MIGRATION = 'FixFirstMentionedInCommitAt'
BATCH_SIZE = 10_000
INTERVAL = 2.minutes.to_i
disable_ddl_transaction!
def up
scope = Gitlab::BackgroundMigration::FixFirstMentionedInCommitAt::TmpIssueMetrics
.from_2020
queue_background_migration_jobs_by_range_at_intervals(
scope,
MIGRATION,
INTERVAL,
batch_size: BATCH_SIZE,
track_jobs: true,
primary_column_name: :issue_id
)
end
def down
# noop
end
end
|