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