mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-25 12:01:04 +02:00
chore: incorporate review comments
This commit is contained in:
parent
656977d7cd
commit
acce761917
2 changed files with 19 additions and 0 deletions
|
|
@ -261,6 +261,7 @@ class ARIHangupStrategy(HangupStrategy):
|
|||
(Redis ``ari:channel:{id}`` -> run_id -> ``initial_context``). Best-effort:
|
||||
never blocks dograh's own hangup if the upstream call fails.
|
||||
"""
|
||||
redis = None
|
||||
try:
|
||||
import redis.asyncio as aioredis
|
||||
|
||||
|
|
@ -319,3 +320,9 @@ class ARIHangupStrategy(HangupStrategy):
|
|||
)
|
||||
except Exception as e:
|
||||
logger.error(f"[ARI Hangup] external PBX terminate check failed: {e}")
|
||||
finally:
|
||||
if redis is not None:
|
||||
try:
|
||||
await redis.aclose()
|
||||
except Exception as e:
|
||||
logger.warning(f"[ARI Hangup] failed to close Redis client: {e}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue