This commit is contained in:
jifan 2026-01-30 11:55:31 +00:00 committed by GitHub
commit 3a7f34719d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -85,6 +85,12 @@ describe("buildGatewayReloadPlan", () => {
expect(plan.reloadHooks).toBe(true);
});
it("restarts heartbeat when agents.list changes", () => {
const plan = buildGatewayReloadPlan(["agents.list"]);
expect(plan.restartGateway).toBe(false);
expect(plan.restartHeartbeat).toBe(true);
});
it("restarts providers when provider config prefixes change", () => {
const changedPaths = ["web.enabled", "channels.telegram.botToken"];
const plan = buildGatewayReloadPlan(changedPaths);

View File

@ -53,6 +53,7 @@ const BASE_RELOAD_RULES: ReloadRule[] = [
kind: "hot",
actions: ["restart-heartbeat"],
},
{ prefix: "agents.list", kind: "hot", actions: ["restart-heartbeat"] },
{ prefix: "agent.heartbeat", kind: "hot", actions: ["restart-heartbeat"] },
{ prefix: "cron", kind: "hot", actions: ["restart-cron"] },
{