2017-05-17 12:17:15 -04:00
|
|
|
module Gitlab
|
|
|
|
module Git
|
|
|
|
module Storage
|
|
|
|
class Inaccessible < StandardError
|
|
|
|
attr_reader :retry_after
|
|
|
|
|
|
|
|
def initialize(message = nil, retry_after = nil)
|
|
|
|
super(message)
|
|
|
|
@retry_after = retry_after
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
CircuitOpen = Class.new(Inaccessible)
|
2017-09-21 09:55:08 -04:00
|
|
|
Misconfiguration = Class.new(Inaccessible)
|
2017-10-19 02:32:55 -04:00
|
|
|
Failing = Class.new(Inaccessible)
|
2017-05-17 12:17:15 -04:00
|
|
|
|
|
|
|
REDIS_KEY_PREFIX = 'storage_accessible:'.freeze
|
2017-11-27 04:44:36 -05:00
|
|
|
REDIS_KNOWN_KEYS = "#{REDIS_KEY_PREFIX}known_keys_set".freeze
|
2017-05-17 12:17:15 -04:00
|
|
|
|
|
|
|
def self.redis
|
|
|
|
Gitlab::Redis::SharedState
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|