Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow non-positive integer delays for immediate backoff strategy
Per [the documentation](https://github.com/mixmaxhq/bee-queue#jobbackoffstrategy-delayfactor) you should be able to call `job.backoff('immediate')` to set an immediate backoff strategy for retried jobs. However, the `backoff` method explicitly disallowed this by checking for `Number.isSafeInteger(undefined)` which returns false. This means you currently cannot specify an immediate backoff strategy without also specifying a positive delay value. To fix this, only check for valid integers when the strategy is not `immediate`.
- Loading branch information
Garret Meier
authored and
Eli Skeggs
committed
Jan 27, 2020
1 parent
c228806
commit fac1f67
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters