From 627b44bac2a6464a80a8ce7f94b8713e3586b518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Tue, 5 Aug 2025 14:00:18 -0700 Subject: [PATCH] runner: use new RunnerArguments handle_sigint/handle_sigterm This allow us to control applications behavior from the runner arguments, which depen on the environment they run. --- src/pipecat/runner/run.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pipecat/runner/run.py b/src/pipecat/runner/run.py index 77902adfd..ff4a09c35 100644 --- a/src/pipecat/runner/run.py +++ b/src/pipecat/runner/run.py @@ -145,6 +145,7 @@ async def _run_telephony_bot(websocket: WebSocket): # Just pass the WebSocket - let the bot handle parsing runner_args = WebSocketRunnerArguments(websocket=websocket) + runner_args.handle_sigint = False await bot_module.bot(runner_args) @@ -222,6 +223,7 @@ def _setup_webrtc_routes(app: FastAPI, esp32_mode: bool = False, host: str = "lo bot_module = _get_bot_module() runner_args = SmallWebRTCRunnerArguments(webrtc_connection=pipecat_connection) + runner_args.handle_sigint = False background_tasks.add_task(bot_module.bot, runner_args) answer = pipecat_connection.get_answer() @@ -264,6 +266,7 @@ def _setup_daily_routes(app: FastAPI): # Start the bot in the background with empty body for GET requests bot_module = _get_bot_module() runner_args = DailyRunnerArguments(room_url=room_url, token=token, body={}) + runner_args.handle_sigint = False asyncio.create_task(bot_module.bot(runner_args)) return RedirectResponse(room_url) @@ -308,6 +311,7 @@ def _setup_daily_routes(app: FastAPI): # Start the bot in the background with extracted body data bot_module = _get_bot_module() runner_args = DailyRunnerArguments(room_url=room_url, token=token, body=bot_body) + runner_args.handle_sigint = False asyncio.create_task(bot_module.bot(runner_args)) # Match PCC /start endpoint response format: return {"dailyRoom": room_url, "dailyToken": token}