fix(bot): 🚑 Fix redis pipelines.

This commit is contained in:
Nyeki.py
2024-11-03 23:07:31 -03:00
parent 7b310a2110
commit 4701e8194c
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -822,7 +822,7 @@ class Calls(base.Cog):
other_replies + f",{message.id}",
)
await pipe.execute()
await pipe.exec()
@commands.Cog.listener()
@commands.guild_only()
@@ -986,7 +986,7 @@ class Calls(base.Cog):
),
)
await pipe.execute()
await pipe.exec()
async with aiohttp.ClientSession() as session:
webhook = other_channel.webhook(session)
+3 -3
View File
@@ -22,7 +22,7 @@ async def flush():
pipe.smembers(constants.CALL_IDS_TO_FLUSH)
pipe.delete(constants.CALL_IDS_TO_FLUSH)
call_ids, _ = await pipe.execute()
call_ids, _ = await pipe.exec()
# Redis returns bytes.
call_ids = [int(call_id) for call_id in call_ids]
@@ -40,7 +40,7 @@ async def flush():
pipe.hgetall(constants.CALL_MESSAGE_CONTENTS_TEMPLATE % call_id)
for call_id, (messages, message_contents) in zip(
call_ids, utils.chunks(await pipe.execute(), 2)
call_ids, utils.chunks(await pipe.exec(), 2)
):
message_rows: list[models.Message] = []
@@ -68,7 +68,7 @@ async def flush():
constants.CALL_IS_ACTIVE % call_id,
)
await pipe.execute()
await pipe.exec()
for _ in range(5):
try: