more timeout

This commit is contained in:
MathMan05 2024-10-31 12:43:22 -05:00
parent fa4e3b18a7
commit ff76e91ff8

View file

@ -30,6 +30,9 @@ async function checkCache(){
} }
console.log(lastcache); console.log(lastcache);
fetch("/getupdates").then(async data=>{ fetch("/getupdates").then(async data=>{
setTimeout((_: any)=>{
checkedrecently = false;
}, 1000 * 60 * 30);
if(!data.ok) return; if(!data.ok) return;
const text = await data.clone().text(); const text = await data.clone().text();
console.log(text, lastcache); console.log(text, lastcache);
@ -38,9 +41,6 @@ async function checkCache(){
putInCache("/getupdates", data); putInCache("/getupdates", data);
} }
checkedrecently = true; checkedrecently = true;
setTimeout((_: any)=>{
checkedrecently = false;
}, 1000 * 60 * 30);
}); });
} }
var checkedrecently = false; var checkedrecently = false;