fix: cleanup rtf on pipeline finish

This commit is contained in:
Abhishek Kumar 2026-03-25 22:44:38 +05:30
parent 6054300837
commit 2d91336aec
2 changed files with 5 additions and 0 deletions

View file

@ -121,6 +121,10 @@ class RealtimeFeedbackObserver(BaseObserver):
self._clock_start_time = None
self._pts_start_time = None
async def cleanup(self):
"""Clean up resources. Must be called when the observer is no longer needed."""
await self._cancel_clock_task()
async def _handle_interruption(self):
"""Handle interruption by clearing queued bot text.

View file

@ -913,4 +913,5 @@ async def _run_pipeline(
except asyncio.CancelledError:
logger.warning("Received CancelledError in _run_pipeline")
finally:
await feedback_observer.cleanup()
logger.debug(f"Cleaned up context providers for workflow run {workflow_run_id}")