use finally

This commit is contained in:
Nour Alharithi
2023-12-04 21:40:49 -08:00
parent c4059d3ca0
commit 05a1a92598
2 changed files with 6 additions and 6 deletions

View File

@@ -293,11 +293,12 @@ const main = async () => {
.fetch()
.then(() => {
gpaFetchDurationHistogram.record(Date.now() - startFetch);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
recursiveFetch();
})
.catch(() => {
logger.error('Failed to fetch GPA');
})
.finally(() => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
recursiveFetch();
});
}, delay);

View File

@@ -235,12 +235,11 @@ const main = async () => {
setTimeout(() => {
dlobProvider
.fetch()
.then(() => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
recursiveFetch();
})
.catch(() => {
logger.error('Failed to fetch GPA');
})
.finally(() => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
recursiveFetch();
});
}, delay);