From a208a2055815348680ebb694b7facd057bb4ba00 Mon Sep 17 00:00:00 2001 From: "Nyeki.py" <84998222+Nekidev@users.noreply.github.com> Date: Sat, 16 Nov 2024 01:00:12 -0300 Subject: [PATCH] fix(shard): :ambulance: Hangup not working properly. --- payphone/core/calls.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/payphone/core/calls.py b/payphone/core/calls.py index 59ee729..deb6731 100644 --- a/payphone/core/calls.py +++ b/payphone/core/calls.py @@ -492,11 +492,13 @@ class CallHandler: ) ] - for channel in channels: - await self.set_searching(channel, False) + pipe = self.bot.redis.pipeline(transaction=True) - await self.bot.redis.hdel("calls:channels:active", *channels) - await self.bot.redis.hdel("calls:calls:active", call_id) + pipe.srem("calls:channels:searching", *channels) + pipe.hdel("calls:channels:active", *channels) + pipe.hdel("calls:calls:active", call_id) + + await pipe.execute() return tuple(channels)