mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
set timeout for repository data loader
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user