mirror of
https://github.com/stablyai/orca.git
synced 2026-10-21 08:03:33 +00:00
fix(server): terminate verifier terminal trees
This commit is contained in:
@@ -39,6 +39,14 @@ async function shutdownDaemon(
|
||||
let requestError: unknown
|
||||
try {
|
||||
await client.ensureConnectedWithin(5_000)
|
||||
const { sessions } = await client.request<{
|
||||
sessions: { sessionId: string; isAlive: boolean }[]
|
||||
}>('listSessions', undefined, 10_000)
|
||||
for (const session of sessions) {
|
||||
if (session.isAlive) {
|
||||
await client.request('kill', { sessionId: session.sessionId, immediate: true }, 10_000)
|
||||
}
|
||||
}
|
||||
await client.request('shutdown', { killSessions: true }, 10_000)
|
||||
} catch (error) {
|
||||
requestError = error
|
||||
|
||||
Reference in New Issue
Block a user