blob: 2f0fd0cc7997a436429d7f0a2c32d4ad135b22aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# frozen_string_literal: true
module Gitlab
module SidekiqMiddleware
module PauseControl
DEFAULT_STRATEGY = :none
UnknownStrategyError = Class.new(StandardError)
STRATEGIES = {
zoekt: ::Gitlab::SidekiqMiddleware::PauseControl::Strategies::Zoekt,
none: ::Gitlab::SidekiqMiddleware::PauseControl::Strategies::None
}.freeze
def self.for(name)
STRATEGIES.fetch(name, STRATEGIES[DEFAULT_STRATEGY])
end
end
end
end
|