MCPcopy Index your code
hub / github.com/OpenSIST/OpenSIST.github.io / scheduleSync

Function scheduleSync

src/Data/CoreCacheSync.js:125–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123}
124
125function scheduleSync() {
126 if (!active || idleHandle !== null) {
127 return;
128 }
129 const run = () => {
130 idleHandle = null;
131 void syncCoreCache().catch(() => {});
132 };
133 if ("requestIdleCallback" in window) {
134 idleHandle = window.requestIdleCallback(run, {timeout: 5000});
135 } else {
136 idleHandle = window.setTimeout(run, 1000);
137 }
138}
139
140export function startCoreCacheSync() {
141 if (active) {

Callers 2

syncCoreCacheFunction · 0.85
startCoreCacheSyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected