From c5cd5f21b136fe92ffe0c30efbd1e3d5dddcd8ba Mon Sep 17 00:00:00 2001 From: nofir Date: Fri, 27 Oct 2023 15:13:30 -0400 Subject: [PATCH] feat: updated log --- src/jobs/seaport-sync/backfill-queue.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jobs/seaport-sync/backfill-queue.ts b/src/jobs/seaport-sync/backfill-queue.ts index 85e07cd..ab64389 100644 --- a/src/jobs/seaport-sync/backfill-queue.ts +++ b/src/jobs/seaport-sync/backfill-queue.ts @@ -33,7 +33,7 @@ if (config.doBackfillWork && config.doOpenseaWork) { } catch (error: any) { job.data.newCursor = cursor; - if (error.response?.status === 429) { + if ([429, 503].includes(error.response?.status)) { // Wait to avoid rate-limiting job.data.retry = true; await new Promise((resolve) => setTimeout(resolve, 1000)); @@ -41,7 +41,7 @@ if (config.doBackfillWork && config.doOpenseaWork) { logger.error( BACKFILL_QUEUE_NAME, - `SeaPort Sync failed attempts=${job.attemptsMade}, error=${error}` + `SeaPort Sync failed attempts=${job.attemptsMade}, fromTimestamp=${fromTimestamp}, toTimestamp=${toTimestamp}, cursor=${cursor}, error=${error}` ); } },