log-rechecked
This commit is contained in:
parent
7a899a9593
commit
af6669a8e8
|
@ -117,9 +117,10 @@ async def messages_routing(msg, state):
|
|||
logger.info('re-check this one...')
|
||||
nospaces_text = text.replace(' ', '')
|
||||
nospaces_text_score = detector(nospaces_text)
|
||||
nospaces_text_perc = math.floor(toxic_score * 100)
|
||||
logger.info(f'no spaces text toxic: {nospaces_text_score}')
|
||||
if nospaces_text != text and nospaces_text_score > toxic_score:
|
||||
toxic_score = nospaces_text_score + 10
|
||||
toxic_perc = nospaces_text_perc + 10
|
||||
|
||||
await redis.set(f"toxic:{cid}", mid)
|
||||
await redis.set(f"toxic:{cid}:{uid}:{mid}", toxic_perc, ex=60 * 60 * 24 * 3)
|
||||
|
|
Loading…
Reference in New Issue
Block a user