fix(gateway): handle SIGTERM shutdown cleanly

This commit is contained in:
Peter Steinberger
2025-12-12 18:28:08 +00:00
parent c86cb4e9a5
commit 8fb3aef917
6 changed files with 72 additions and 7 deletions

View File

@@ -157,7 +157,10 @@ describe("gateway server", () => {
},
}),
);
await onceMessage(ws, (o) => o.type === "res" && o.id === "agent-last-stale");
await onceMessage(
ws,
(o) => o.type === "res" && o.id === "agent-last-stale",
);
const spy = vi.mocked(agentCommand);
expect(spy).toHaveBeenCalled();