redis-fix
This commit is contained in:
@@ -38,7 +38,7 @@ async def messages_routing(msg, state):
|
|||||||
scoring_msg_id = mid
|
scoring_msg_id = mid
|
||||||
pattern = f"toxic:{cid}:{uid}:*"
|
pattern = f"toxic:{cid}:{uid}:*"
|
||||||
scores = []
|
scores = []
|
||||||
async for key in client.scan_iter(pattern):
|
async for key in redis.scan_iter(pattern):
|
||||||
scr = int(await redis.get(key))
|
scr = int(await redis.get(key))
|
||||||
scores.append(scr)
|
scores.append(scr)
|
||||||
toxic_score = math.floor(sum(scores)/len(scores)) if scores else 0
|
toxic_score = math.floor(sum(scores)/len(scores)) if scores else 0
|
||||||
|
Reference in New Issue
Block a user