Skip to content

Commit

Permalink
fix: change delay to back off more on subsequent failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jumoel committed Mar 14, 2024
1 parent 1ec0e93 commit c32977f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workspaces/data/bin/fetch-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const main = async (currentRun = 0) => {
log.error('status', err.status)

if (err.status === 403 && currentRun <= 5) {
const retryDelay = config.delay ? 1000 * 60 * 10 : 0
const retryDelay = config.delay ? (currentRun + 1) * config.delay * 60 * 10 : 0
log.warn('='.repeat(80))
log.warn('='.repeat(80))
log.warn(`Retrying: run number ${currentRun} fetch-data script in ${retryDelay}ms`)
Expand Down

0 comments on commit c32977f

Please sign in to comment.