MCPcopy
hub / github.com/seanprashad/leetcode-patterns / flushPendingUpload

Function flushPendingUpload

src/lib/sync.ts:82–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80
81// Flush any pending debounced upload immediately (e.g. on page unload)
82export function flushPendingUpload(): void {
83 if (uploadTimer && pendingUserId) {
84 clearTimeout(uploadTimer);
85 uploadTimer = null;
86 const uid = pendingUserId;
87 pendingUserId = null;
88 doUpload(uid);
89 }
90}
91
92// Merge from a realtime payload (no API call needed).
93// Returns true if any data actually changed locally.

Callers 2

flushFunction · 0.90
sync.test.tsFile · 0.90

Calls 1

doUploadFunction · 0.85

Tested by

no test coverage detected