MCPcopy Index your code
hub / github.com/bee-queue/bee-queue / computeDelay

Method computeDelay

lib/job.js:232–241  ·  view source on GitHub ↗

* Compute the delay for rescheduling the job after it fails. * * @return {number} The number of milliseconds into the future to schedule it. * Negative if no defined strategy or no remaining retries.

()

Source from the content-addressed store, hash-verified

230 * Negative if no defined strategy or no remaining retries.
231 */
232 computeDelay() {
233 const strategyName = this.options.backoff
234 ? this.options.backoff.strategy
235 : 'immediate';
236 const strategy =
237 this.options.retries > 0
238 ? this.queue.backoffStrategies.get(strategyName)
239 : null;
240 return strategy ? strategy(this) : -1;
241 }
242}
243
244module.exports = Job;

Callers 1

_finishJobMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected