Commit d807802a authored by Magdalena Frankiewicz's avatar Magdalena Frankiewicz

Change Redis key format for unique visits

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