mirror of
https://github.com/theodore-song/polymarket-analyst.git
synced 2026-08-19 18:48:10 +00:00
Keep cached cycles active in background tabs
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
const INTERVAL_MS = 60000;
|
||||
|
||||
postMessage({ type: "ready", at: Date.now() });
|
||||
|
||||
self.onmessage = event => {
|
||||
if(event.data && event.data.type === "ping") postMessage({ type: "ready", at: Date.now() });
|
||||
};
|
||||
|
||||
setInterval(() => {
|
||||
postMessage({ type: "cycle", at: Date.now() });
|
||||
}, INTERVAL_MS);
|
||||
Reference in New Issue
Block a user