diff --git a/src/index.ts b/src/index.ts index 6205ddc..4a1127b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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); diff --git a/src/publishers/dlobPublisher.ts b/src/publishers/dlobPublisher.ts index 9f7d311..1a3e317 100644 --- a/src/publishers/dlobPublisher.ts +++ b/src/publishers/dlobPublisher.ts @@ -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);