Commit dc77ef52 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'change-key-format-for-unique-visits-in-redis' into 'master'

Change Redis key format for unique visits

See merge request gitlab-org/gitlab!36200
parents bc5d3b91 d807802a
......@@ -43,9 +43,7 @@ module Gitlab
keys = TARGET_IDS.map { |target_id| key(target_id, week_of) }
Gitlab::Redis::SharedState.with do |redis|
Gitlab::Instrumentation::RedisClusterValidator.allow_cross_slot_commands do
redis.pfcount(*keys)
end
redis.pfcount(*keys)
end
end
......@@ -55,7 +53,7 @@ module Gitlab
raise "Invalid target id #{target_id}" unless TARGET_IDS.include?(target_id.to_s)
year_week = time.strftime('%G-%V')
"#{target_id}-#{year_week}"
"#{target_id}-{#{year_week}}"
end
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