mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-05 22:38:11 +00:00
fix(api): fetching data period fix
This commit is contained in:
@@ -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()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user