fix(reduce): wrong key while fetching last event

This commit is contained in:
Anhgelus Morhtuuzh 2024-07-01 14:48:07 +02:00
parent 5b0d9e4dd3
commit 91f71b33cd
Signed by: anhgelus
GPG key ID: CAD341EFA92DDDE5

View file

@ -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 {