debian-mirror-gitlab/lib/gitlab/git/storage.rb

26 lines
604 B
Ruby
Raw Normal View History

2017-09-10 17:25:29 +05:30
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)
2018-03-17 18:26:18 +05:30
Misconfiguration = Class.new(Inaccessible)
Failing = Class.new(Inaccessible)
2017-09-10 17:25:29 +05:30
REDIS_KEY_PREFIX = 'storage_accessible:'.freeze
2018-03-17 18:26:18 +05:30
REDIS_KNOWN_KEYS = "#{REDIS_KEY_PREFIX}known_keys_set".freeze
2017-09-10 17:25:29 +05:30
def self.redis
Gitlab::Redis::SharedState
end
end
end
end