fix(api): fetching data period fix

This commit is contained in:
2026-05-04 22:30:55 +02:00
parent a70a1d110b
commit a1f227e3a3
+4 -4
View File
@@ -63,14 +63,14 @@ export const useApiStore = defineStore('apiStore', {
]); ]);
if (this.nextDataCheckTime == 0) { if (this.nextDataCheckTime == 0) {
this.nextDataCheckTime = getRandomDurationFromRange(5000, 7500); this.nextDataCheckTime = t + getRandomDurationFromRange(5000, 7500);
} else { } else {
this.nextDataCheckTime = getRandomDurationFromRange(600000, 720000); this.nextDataCheckTime = t + getRandomDurationFromRange(600000, 720000);
} }
console.log( console.log(
'Next data check at:', 'Next time check:',
new Date(Date.now() + this.nextDataCheckTime).toLocaleTimeString() new Date(Date.now() + this.nextDataCheckTime - t).toLocaleTimeString()
); );
} }