fix(gateway): handle SIGTERM shutdown cleanly

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

No files matched your search

+4 -1
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();
+1 -1
View File
@@ -34,9 +34,9 @@ import { monitorWebProvider, webAuthExists } from "../providers/web/index.js";
import { defaultRuntime } from "../runtime.js";
import { monitorTelegramProvider } from "../telegram/monitor.js";
import { sendMessageTelegram } from "../telegram/send.js";
import { normalizeE164 } from "../utils.js";
import { sendMessageWhatsApp } from "../web/outbound.js";
import { ensureWebChatServerFromConfig } from "../webchat/server.js";
import { normalizeE164 } from "../utils.js";
import { buildMessageWithAttachments } from "./chat-attachments.js";
import {
ErrorCodes,