Skip to content

Commit

Permalink
Merge pull request #117 from reservoirprotocol/feat/debug-seaport-bac…
Browse files Browse the repository at this point in the history
…kfill-errors

feat: updated log
  • Loading branch information
nofir authored Oct 27, 2023
2 parents d6b7605 + c5cd5f2 commit cb63691
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 cb63691

Please sign in to comment.