You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no way from the cli client code to know when the agent received SIGTERM or SIGINT and is in the graceful shutdown state. It would be useful to have a possibility for it to emit an event or provide a possibility to assign a callback, so one could execute a custom code when that happens.
FWIW you can do "cleanup" on the "job/worker" level using :
# https://docs.livekit.io/agents/build/session/#post-processing-and-cleanup
# Just add some logging when shutdown is initiated
async def my_shutdown_hook() -> None:
self._log_on_livekit_event_sync("shutdown callback")
self.ctx.add_shutdown_callback(my_shutdown_hook)
If you feel real hacky, you can overwrite their SIGTERM catch in the JobEntry func,
but that can be dangerous you had been warned.
Currently there is no way from the cli client code to know when the agent received SIGTERM or SIGINT and is in the graceful shutdown state. It would be useful to have a possibility for it to emit an event or provide a possibility to assign a callback, so one could execute a custom code when that happens.
Related to livekit/livekit-helm#116
The text was updated successfully, but these errors were encountered: