worker-fix
All checks were successful
deploy / deploy (push) Successful in 1m17s

This commit is contained in:
Untone 2023-11-26 21:31:52 +03:00
parent 2eaefaa62f
commit 2e7b7ab2a4

View File

@ -19,6 +19,9 @@ async def handle_reaction(notification: dict[str, str | int]):
async def reactions_worker(): async def reactions_worker():
async for message in redis.listen("reaction"): async for message in redis.listen("reaction"):
msg = json.loads((await message).get("data", "")) message = await message
if msg: if message:
await handle_reaction(msg) msg_data = message.get("data")
if msg_data:
msg = json.loads(msg_data)
await handle_reaction(msg)