MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / stop

Function stop

packages/server/src/svc/schtasks.ts:150–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148 }
149
150 async function stop(): Promise<LifecycleResult> {
151 const result = await deps.execSchtasks(['/End', '/TN', KIMI_SERVER_TASK_NAME]);
152 if (result.code !== 0) {
153 return {
154 ok: false,
155 message: `schtasks /End failed: ${detail(result) ?? 'unknown error'}`,
156 };
157 }
158 return { ok: true, message: `Kimi server stopped (${KIMI_SERVER_TASK_NAME}).` };
159 }
160
161 async function restart(): Promise<LifecycleResult> {
162 const end = await deps.execSchtasks(['/End', '/TN', KIMI_SERVER_TASK_NAME]);

Callers

nothing calls this directly

Calls 2

execSchtasksMethod · 0.80
detailFunction · 0.70

Tested by

no test coverage detected