Welcome to mirror list, hosted at ThFree Co, Russian Federation.

click_house_migration.rb « strategies « pause_control « sidekiq_middleware « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c1d33885a408aa0f11eae503987882dd2b6d43d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Gitlab
  module SidekiqMiddleware
    module PauseControl
      module Strategies
        class ClickHouseMigration < Base
          override :should_pause?
          def should_pause?
            return false unless Feature.enabled?(:pause_clickhouse_workers_during_migration)

            ::ClickHouse::MigrationSupport::ExclusiveLock.pause_workers?
          end
        end
      end
    end
  end
end