From 6e47637dd4f93169ec783c01f4f9b4dfb7cb66ce Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 18 Jul 2024 17:23:40 +0200 Subject: [PATCH] Fix grouping across hourly buckets happening in a 12 seconds window instead of 12 hours window (#31062) --- app/services/notify_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index acbb3fc784..23f92c816b 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -217,7 +217,7 @@ class NotifyService < BaseService hour_bucket = previous_bucket if hour_bucket < previous_bucket + MAXIMUM_GROUP_SPAN_HOURS # We do not concern ourselves with race conditions since we use hour buckets - redis.set(redis_key, hour_bucket, ex: MAXIMUM_GROUP_SPAN_HOURS) + redis.set(redis_key, hour_bucket, ex: MAXIMUM_GROUP_SPAN_HOURS.hours.to_i) "#{type_prefix}-#{hour_bucket}" end