MCPcopy Create free account
hub / github.com/tiann/hapi / triggerDedupIfNeeded

Method triggerDedupIfNeeded

hub/src/sync/syncEngine.ts:1404–1411  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

1402 }
1403
1404 private triggerDedupIfNeeded(sessionId: string): void {
1405 const session = this.sessionCache.getSession(sessionId)
1406 if (session?.metadata) {
1407 void this.sessionCache.deduplicateByAgentSessionId(sessionId).catch(() => {
1408 // best-effort: web-side safety net hides remaining duplicates
1409 })
1410 }
1411 }
1412
1413 async waitForSessionActive(sessionId: string, timeoutMs: number = 15_000): Promise<boolean> {
1414 const start = Date.now()

Callers 3

handleSessionAliveMethod · 0.95
handleSessionEndMethod · 0.95
expireInactiveMethod · 0.95

Calls 2

getSessionMethod · 0.45

Tested by

no test coverage detected