use finally
This commit is contained in:
@@ -293,11 +293,12 @@ const main = async () => {
|
|||||||
.fetch()
|
.fetch()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
gpaFetchDurationHistogram.record(Date.now() - startFetch);
|
gpaFetchDurationHistogram.record(Date.now() - startFetch);
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
recursiveFetch();
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
logger.error('Failed to fetch GPA');
|
logger.error('Failed to fetch GPA');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
recursiveFetch();
|
recursiveFetch();
|
||||||
});
|
});
|
||||||
}, delay);
|
}, delay);
|
||||||
|
|||||||
@@ -235,12 +235,11 @@ const main = async () => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dlobProvider
|
dlobProvider
|
||||||
.fetch()
|
.fetch()
|
||||||
.then(() => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
recursiveFetch();
|
|
||||||
})
|
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
logger.error('Failed to fetch GPA');
|
logger.error('Failed to fetch GPA');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
recursiveFetch();
|
recursiveFetch();
|
||||||
});
|
});
|
||||||
}, delay);
|
}, delay);
|
||||||
|
|||||||
Reference in New Issue
Block a user