From 91f71b33cd0e34526a1c5786dbb3ce59e97e59e0 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Mon, 1 Jul 2024 14:48:07 +0200 Subject: [PATCH] fix(reduce): wrong key while fetching last event --- xp/member.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xp/member.go b/xp/member.go index 639e0d6..b4fee22 100644 --- a/xp/member.go +++ b/xp/member.go @@ -113,7 +113,7 @@ func (c *Copaing) HourSinceLastEvent() uint { utils.SendAlert("xp/member.go - Getting redis client (get)", err.Error()) return 0 } - res := client.Get(context.Background(), fmt.Sprintf("%s:%s", c.GenKey(""), LastEvent)) + res := client.Get(context.Background(), c.GenKey(LastEvent)) if errors.Is(res.Err(), redis.Nil) { return 0 } else if res.Err() != nil {