Merge dadf3367c1 into da71eaebd2
This commit is contained in:
commit
3a7f34719d
@ -85,6 +85,12 @@ describe("buildGatewayReloadPlan", () => {
|
|||||||
expect(plan.reloadHooks).toBe(true);
|
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", () => {
|
it("restarts providers when provider config prefixes change", () => {
|
||||||
const changedPaths = ["web.enabled", "channels.telegram.botToken"];
|
const changedPaths = ["web.enabled", "channels.telegram.botToken"];
|
||||||
const plan = buildGatewayReloadPlan(changedPaths);
|
const plan = buildGatewayReloadPlan(changedPaths);
|
||||||
|
|||||||
@ -53,6 +53,7 @@ const BASE_RELOAD_RULES: ReloadRule[] = [
|
|||||||
kind: "hot",
|
kind: "hot",
|
||||||
actions: ["restart-heartbeat"],
|
actions: ["restart-heartbeat"],
|
||||||
},
|
},
|
||||||
|
{ prefix: "agents.list", kind: "hot", actions: ["restart-heartbeat"] },
|
||||||
{ prefix: "agent.heartbeat", kind: "hot", actions: ["restart-heartbeat"] },
|
{ prefix: "agent.heartbeat", kind: "hot", actions: ["restart-heartbeat"] },
|
||||||
{ prefix: "cron", kind: "hot", actions: ["restart-cron"] },
|
{ prefix: "cron", kind: "hot", actions: ["restart-cron"] },
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user