chore: format code with pre-commit script

This commit is contained in:
Sabiha Khan 2026-02-23 15:06:25 +05:30
parent 30eebfe811
commit 000c648e7e
8 changed files with 161 additions and 110 deletions

View file

@ -85,7 +85,9 @@ class CallTransferManager:
except Exception as e:
logger.error(f"Failed to remove transfer context: {e}")
async def store_transfer_channel_mapping(self, channel_id: str, transfer_id: str) -> None:
async def store_transfer_channel_mapping(
self, channel_id: str, transfer_id: str
) -> None:
"""Store channel->transfer mapping in Redis for event correlation.
Args:
@ -94,10 +96,16 @@ class CallTransferManager:
"""
try:
redis = await self._get_redis()
await redis.setex(f"ari:transfer_channel:{channel_id}", 300, transfer_id) # 5 minute TTL
logger.debug(f"[Transfer Manager] Stored channel mapping: channel={channel_id}, transfer_id={transfer_id}")
await redis.setex(
f"ari:transfer_channel:{channel_id}", 300, transfer_id
) # 5 minute TTL
logger.debug(
f"[Transfer Manager] Stored channel mapping: channel={channel_id}, transfer_id={transfer_id}"
)
except Exception as e:
logger.error(f"[Transfer Manager] Error storing transfer channel mapping: {e}")
logger.error(
f"[Transfer Manager] Error storing transfer channel mapping: {e}"
)
async def publish_transfer_event(self, event: TransferEvent) -> None:
"""Publish transfer event to Redis channel.