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