mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
set timeout for repository data loader
This commit is contained in:
@@ -42,6 +42,8 @@ export class RepositoryDataLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async startFetchDataAndUpdate() {
|
private async startFetchDataAndUpdate() {
|
||||||
|
const timeout = 60000;
|
||||||
|
|
||||||
if (!this.shouldBeRunning) return;
|
if (!this.shouldBeRunning) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -53,9 +55,7 @@ export class RepositoryDataLoader {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
} finally {
|
} finally {
|
||||||
// TODO test if memoization of shouldBeRunning works as intended,
|
setTimeout(this.startFetchDataAndUpdate, timeout);
|
||||||
// I have no idea how JavaScript works
|
|
||||||
// setTimeout(this.startFetchDataAndUpdate, timeout);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user