summaryrefslogtreecommitdiff
path: root/app/workers/database/batched_background_migration_worker.rb
blob: 6a41fe70915a1a3d12ba6f6c22bd788b45fa3c44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Database
  class BatchedBackgroundMigrationWorker # rubocop:disable Scalability/IdempotentWorker
    include BatchedBackgroundMigration::SingleDatabaseWorker

    def self.enabled?
      Feature.enabled?(:execute_batched_migrations_on_schedule, type: :ops, default_enabled: :yaml)
    end

    def self.tracking_database
      @tracking_database ||= Gitlab::Database::MAIN_DATABASE_NAME.to_sym
    end
  end
end