set timeout for repository data loader

This commit is contained in:
2025-01-15 21:32:06 -08:00
parent 7b2dae6e5a
commit 7917cd7126

View File

@@ -42,6 +42,8 @@ export class RepositoryDataLoader {
}
private async startFetchDataAndUpdate() {
const timeout = 60000;
if (!this.shouldBeRunning) return;
try {
@@ -53,9 +55,7 @@ export class RepositoryDataLoader {
} catch (e) {
console.error(e);
} finally {
// TODO test if memoization of shouldBeRunning works as intended,
// I have no idea how JavaScript works
// setTimeout(this.startFetchDataAndUpdate, timeout);
setTimeout(this.startFetchDataAndUpdate, timeout);
}
}