mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-05 14:28: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) {
|
||||
this.nextDataCheckTime = getRandomDurationFromRange(5000, 7500);
|
||||
this.nextDataCheckTime = t + getRandomDurationFromRange(5000, 7500);
|
||||
} else {
|
||||
this.nextDataCheckTime = getRandomDurationFromRange(600000, 720000);
|
||||
this.nextDataCheckTime = t + getRandomDurationFromRange(600000, 720000);
|
||||
}
|
||||
|
||||
console.log(
|
||||
'Next data check at:',
|
||||
new Date(Date.now() + this.nextDataCheckTime).toLocaleTimeString()
|
||||
'Next time check:',
|
||||
new Date(Date.now() + this.nextDataCheckTime - t).toLocaleTimeString()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user