Commit 20643798 authored by Toon Claes's avatar Toon Claes

Use Redis SharedState instead of Cache

parent 761c545d
......@@ -7,7 +7,7 @@ module Gitlab
attr_reader :log_level
attr_accessor :previous_id
GEO_LOG_CURSOR_GAPS = "Gitlab::Geo::LogCursor::Gaps".freeze
GEO_LOG_CURSOR_GAPS = 'geo:log_cursor:gaps'.freeze
GAP_GRACE_PERIOD = 10.minutes
GAP_OUTDATED_PERIOD = 1.hour
......@@ -68,7 +68,7 @@ module Gitlab
end
def with_redis
::Gitlab::Redis::Cache.with { |redis| yield redis }
::Gitlab::Redis::SharedState.with { |redis| yield redis }
end
def grace_timestamp
......
......@@ -137,7 +137,7 @@ describe Gitlab::Geo::LogCursor::EventGapTracking, :clean_gitlab_redis_cache do
end
def read_gaps
::Gitlab::Redis::Cache.with do |redis|
::Gitlab::Redis::SharedState.with do |redis|
redis.zrangebyscore(described_class::GEO_LOG_CURSOR_GAPS, '-inf', '+inf', with_scores: true)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment