Skip to content

Commit

Permalink
feat: updated log
Browse files Browse the repository at this point in the history
  • Loading branch information
nofir committed Oct 27, 2023
1 parent d6b7605 commit c5cd5f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jobs/seaport-sync/backfill-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ 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));
}

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}`
);
}
},
Expand Down

0 comments on commit c5cd5f2

Please sign in to comment.