Skip to content

Commit

Permalink
docs: min instead of max in attempts made or truncate in custom backo…
Browse files Browse the repository at this point in the history
…ff (#2830)
  • Loading branch information
OdedShimoni authored Oct 14, 2024
1 parent 073baf6 commit 9307fef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/gitbook/bull/patterns/custom-backoff-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const myQueue = new Queue("Server B", {
console.error({ attemptsMade, err, options });
return Math.round(
Math.random() *
(Math.pow(2, Math.max(attemptsMade, truncate)) - 1) *
(Math.pow(2, Math.min(attemptsMade, truncate)) - 1) *
delay
);
},
Expand Down

0 comments on commit 9307fef

Please sign in to comment.