From 4701e8194c0dc55665a83c147c99d8beac53d41a Mon Sep 17 00:00:00 2001 From: "Nyeki.py" <84998222+Nekidev@users.noreply.github.com> Date: Sun, 3 Nov 2024 23:07:31 -0300 Subject: [PATCH] fix(bot): :ambulance: Fix redis pipelines. --- payphone/cogs/calls/cog.py | 4 ++-- procs/flush_messages.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/payphone/cogs/calls/cog.py b/payphone/cogs/calls/cog.py index ceefca4..09a31c4 100644 --- a/payphone/cogs/calls/cog.py +++ b/payphone/cogs/calls/cog.py @@ -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) diff --git a/procs/flush_messages.py b/procs/flush_messages.py index 102240c..b867420 100644 --- a/procs/flush_messages.py +++ b/procs/flush_messages.py @@ -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: