fix(gateway): skip heartbeat wake on deduped notifications

This commit is contained in:
Ayaan Zaidi
2026-02-28 11:13:54 +05:30
committed by Ayaan Zaidi
parent a8bcad3db1
commit 6a16e7bb31
4 changed files with 44 additions and 4 deletions

View File

@@ -485,8 +485,13 @@ export const handleNodeEvent = async (ctx: NodeEventContext, nodeId: string, evt
}
}
enqueueSystemEvent(summary, { sessionKey, contextKey: `notification:${key}` });
requestHeartbeatNow({ reason: "notifications-event", sessionKey });
const queued = enqueueSystemEvent(summary, {
sessionKey,
contextKey: `notification:${key}`,
});
if (queued) {
requestHeartbeatNow({ reason: "notifications-event", sessionKey });
}
return;
}
case "chat.subscribe": {