MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / flush

Method flush

packages/sdks/sdk/src/index.ts:320–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

318 }
319
320 flush() {
321 const remaining: TrackHandlerPayload[] = [];
322 for (const item of this.queue) {
323 if (this.shouldQueue(item)) {
324 remaining.push(item);
325 continue;
326 }
327 const payload = this.buildFlushPayload(item);
328 this.send({ ...item, payload } as TrackHandlerPayload);
329 }
330 this.queue = remaining;
331 }
332
333 log(...args: any[]) {
334 if (this.options.debug) {

Callers 3

readyMethod · 0.95
sendMethod · 0.95
identifyMethod · 0.95

Calls 4

shouldQueueMethod · 0.95
buildFlushPayloadMethod · 0.95
sendMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected