mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-28 08:49:42 +02:00
fix: telephony bugs and improve code structure
This commit is contained in:
parent
491e6edd36
commit
f080c563b1
24 changed files with 633 additions and 793 deletions
|
|
@ -102,13 +102,13 @@ class CampaignRunnerService:
|
|||
}
|
||||
|
||||
async def _count_failed_campaign_calls(self, campaign_id: int) -> int:
|
||||
"""Count failed calls by examining workflow_run Twilio callbacks"""
|
||||
"""Count failed calls by examining workflow_run telephony callbacks"""
|
||||
# Get all workflow runs for this campaign
|
||||
workflow_runs = await db_client.get_workflow_runs_by_campaign(campaign_id)
|
||||
|
||||
failed_count = 0
|
||||
for run in workflow_runs:
|
||||
callbacks = run.logs.get("twilio_status_callbacks", [])
|
||||
callbacks = run.logs.get("telephony_status_callbacks", [])
|
||||
if callbacks:
|
||||
# Check final status
|
||||
final_status = callbacks[-1].get("status", "").lower()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue