mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-25 12:01:04 +02:00
Merge remote-tracking branch 'origin/main' into fix/org-scoped-access
# Conflicts: # api/routes/agent_stream.py # api/routes/telephony.py # api/routes/webrtc_signaling.py # docs/api-reference/openapi.json # sdk/python/src/dograh_sdk/_generated_models.py
This commit is contained in:
commit
d22c073cb5
38 changed files with 2332 additions and 471 deletions
|
|
@ -14,14 +14,17 @@ from api.schemas.workflow_configurations import (
|
|||
DEFAULT_TURN_START_MIN_WORDS,
|
||||
DEFAULT_TURN_START_STRATEGY,
|
||||
)
|
||||
from api.services.call_concurrency import call_concurrency
|
||||
from api.services.configuration.registry import ServiceProviders
|
||||
from api.services.integrations import (
|
||||
IntegrationRuntimeContext,
|
||||
create_runtime_sessions,
|
||||
)
|
||||
from api.services.pipecat.active_calls import (
|
||||
register_active_call,
|
||||
unregister_active_call,
|
||||
register_active_call as register_worker_active_call,
|
||||
)
|
||||
from api.services.pipecat.active_calls import (
|
||||
unregister_active_call as unregister_worker_active_call,
|
||||
)
|
||||
from api.services.pipecat.audio_config import AudioConfig, create_audio_config
|
||||
from api.services.pipecat.event_handlers import (
|
||||
|
|
@ -258,7 +261,7 @@ async def run_pipeline_telephony(
|
|||
"""Run a pipeline for any telephony provider."""
|
||||
# Register before any async setup so deploy drains see calls that are still
|
||||
# resolving DB/config/transport state.
|
||||
register_active_call(workflow_run_id)
|
||||
register_worker_active_call(workflow_run_id)
|
||||
try:
|
||||
await _run_pipeline_telephony_impl(
|
||||
websocket,
|
||||
|
|
@ -270,7 +273,10 @@ async def run_pipeline_telephony(
|
|||
transport_kwargs=transport_kwargs,
|
||||
)
|
||||
finally:
|
||||
unregister_active_call(workflow_run_id)
|
||||
try:
|
||||
await call_concurrency.unregister_active_call(workflow_run_id)
|
||||
finally:
|
||||
unregister_worker_active_call(workflow_run_id)
|
||||
|
||||
|
||||
async def _run_pipeline_telephony_impl(
|
||||
|
|
@ -383,7 +389,7 @@ async def run_pipeline_smallwebrtc(
|
|||
"""Run pipeline for WebRTC connections."""
|
||||
# Register before any async setup so deploy drains see calls that are still
|
||||
# resolving DB/config/transport state.
|
||||
register_active_call(workflow_run_id)
|
||||
register_worker_active_call(workflow_run_id)
|
||||
try:
|
||||
await _run_pipeline_smallwebrtc_impl(
|
||||
webrtc_connection,
|
||||
|
|
@ -395,7 +401,10 @@ async def run_pipeline_smallwebrtc(
|
|||
organization_id=organization_id,
|
||||
)
|
||||
finally:
|
||||
unregister_active_call(workflow_run_id)
|
||||
try:
|
||||
await call_concurrency.unregister_active_call(workflow_run_id)
|
||||
finally:
|
||||
unregister_worker_active_call(workflow_run_id)
|
||||
|
||||
|
||||
async def _run_pipeline_smallwebrtc_impl(
|
||||
|
|
@ -495,7 +504,7 @@ async def _run_pipeline(
|
|||
organization_id: int | None = None,
|
||||
) -> None:
|
||||
"""Run the pipeline with active-call drain accounting."""
|
||||
register_active_call(workflow_run_id)
|
||||
register_worker_active_call(workflow_run_id)
|
||||
try:
|
||||
await _run_pipeline_impl(
|
||||
transport,
|
||||
|
|
@ -510,7 +519,10 @@ async def _run_pipeline(
|
|||
organization_id=organization_id,
|
||||
)
|
||||
finally:
|
||||
unregister_active_call(workflow_run_id)
|
||||
try:
|
||||
await call_concurrency.unregister_active_call(workflow_run_id)
|
||||
finally:
|
||||
unregister_worker_active_call(workflow_run_id)
|
||||
|
||||
|
||||
async def _run_pipeline_impl(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue