redis-fix
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user