From d8cd8ecb384e54fcc0a721b269c888a466b60766 Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 26 Sep 2024 17:44:32 +0300 Subject: [PATCH] redis-fix --- handlers/messages_routing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/messages_routing.py b/handlers/messages_routing.py index eb82b99..4c6a9c2 100644 --- a/handlers/messages_routing.py +++ b/handlers/messages_routing.py @@ -38,7 +38,7 @@ async def messages_routing(msg, state): scoring_msg_id = mid pattern = f"toxic:{cid}:{uid}:*" scores = [] - async for key in client.scan_iter(pattern): + async for key in redis.scan_iter(pattern): scr = int(await redis.get(key)) scores.append(scr) toxic_score = math.floor(sum(scores)/len(scores)) if scores else 0