mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-01 08:59:46 +02:00
fix: cleanup rtf on pipeline finish
This commit is contained in:
parent
6054300837
commit
2d91336aec
2 changed files with 5 additions and 0 deletions
|
|
@ -121,6 +121,10 @@ class RealtimeFeedbackObserver(BaseObserver):
|
||||||
self._clock_start_time = None
|
self._clock_start_time = None
|
||||||
self._pts_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):
|
async def _handle_interruption(self):
|
||||||
"""Handle interruption by clearing queued bot text.
|
"""Handle interruption by clearing queued bot text.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -913,4 +913,5 @@ async def _run_pipeline(
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
logger.warning("Received CancelledError in _run_pipeline")
|
logger.warning("Received CancelledError in _run_pipeline")
|
||||||
finally:
|
finally:
|
||||||
|
await feedback_observer.cleanup()
|
||||||
logger.debug(f"Cleaned up context providers for workflow run {workflow_run_id}")
|
logger.debug(f"Cleaned up context providers for workflow run {workflow_run_id}")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue