gitlab-org--gitlab-foss/lib/gitlab/git/storage.rb
Bob Van Landuyt b72d243872 Keep track of all storage keys in a set
That way we don't need the to scan the entire keyspace to get all
known keys
2017-12-01 17:50:43 +01:00

25 lines
604 B
Ruby

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)
Misconfiguration = Class.new(Inaccessible)
Failing = Class.new(Inaccessible)
REDIS_KEY_PREFIX = 'storage_accessible:'.freeze
REDIS_KNOWN_KEYS = "#{REDIS_KEY_PREFIX}known_keys_set".freeze
def self.redis
Gitlab::Redis::SharedState
end
end
end
end