MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / startHeartbeat

Method startHeartbeat

packages/server/src/utils/SSEStreamer.ts:372–379  ·  view source on GitHub ↗
(intervalMs: number = 30_000)

Source from the content-addressed store, hash-verified

370 }
371
372 startHeartbeat(intervalMs: number = 30_000) {
373 this.heartbeatInterval = setInterval(() => {
374 for (const chatId of this.clients.keys()) {
375 // SSE comment line — ignored by clients but keeps the connection alive through ALB/proxies
376 this.safeWrite(chatId, ':heartbeat\n\n')
377 }
378 }, intervalMs)
379 }
380
381 stopHeartbeat() {
382 if (this.heartbeatInterval) {

Callers 1

initDatabaseMethod · 0.80

Calls 1

safeWriteMethod · 0.95

Tested by

no test coverage detected