MCPcopy Index your code
hub / github.com/simstudioai/sim / close

Function close

apps/sim/lib/execution/event-buffer.ts:983–996  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

981 }
982
983 const close = async () => {
984 closed = true
985 if (flushTimer) {
986 clearTimeout(flushTimer)
987 flushTimer = null
988 }
989 if (inflightWrites.size > 0) {
990 await Promise.allSettled(inflightWrites)
991 }
992 if (flushPromise) {
993 await flushPromise
994 }
995 await flushCore(false)
996 }
997
998 const flushCore = async (scheduleOnFailure: boolean) => {
999 await writeQueue

Callers

nothing calls this directly

Calls 1

flushCoreFunction · 0.85

Tested by

no test coverage detected