From f2e0f5d20c3e5d979e0a9d2c57bbf562ad94b3b1 Mon Sep 17 00:00:00 2001 From: OmercohenAviv Date: Sun, 29 Mar 2026 00:05:21 +0300 Subject: [PATCH] move wait_time out of loop --- src/pipecat/pipeline/task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipecat/pipeline/task.py b/src/pipecat/pipeline/task.py index 5f19cf86f..4b471c08e 100644 --- a/src/pipecat/pipeline/task.py +++ b/src/pipecat/pipeline/task.py @@ -967,9 +967,9 @@ class PipelineTask(BasePipelineTask): the time that a heartbeat frame takes to processes, that is how long it takes for the heartbeat frame to traverse all the pipeline. """ + wait_time = self._params.heartbeats_monitor_secs while True: try: - wait_time = self._params.heartbeats_monitor_secs frame = await asyncio.wait_for(self._heartbeat_queue.get(), timeout=wait_time) process_time = (self._clock.get_time() - frame.timestamp) / 1_000_000_000 logger.trace(f"{self}: heartbeat frame processed in {process_time} seconds")