Skip to content

Commit

Permalink
use os.exit to exit forcefully (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Sep 17, 2024
1 parent b616782 commit d2dd303
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/young-hats-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-agents": patch
---

use os.exit to exit forcefully
3 changes: 3 additions & 0 deletions livekit-agents/livekit/agents/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ async def _worker_run(worker: Worker) -> None:
loop.run_until_complete(watch_client.aclose())
except KeyboardInterrupt:
logger.warning("exiting forcefully")
import os

os._exit(1) # TODO(theomonnom): add aclose(force=True) in worker
finally:
try:
tasks = asyncio.all_tasks(loop)
Expand Down

0 comments on commit d2dd303

Please sign in to comment.