qwerk 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -727,6 +727,9 @@ class Queue {
|
|
|
727
727
|
this.logger.error(`Job failed permanently: ${job.id} (${job.name})`, err.message);
|
|
728
728
|
this.emit("failed", job, err);
|
|
729
729
|
this.metricsData.totalFailed++;
|
|
730
|
+
if (job.repeat) {
|
|
731
|
+
await this.scheduleNextRepeat(job);
|
|
732
|
+
}
|
|
730
733
|
} else {
|
|
731
734
|
const delay = calculateBackoff(job.backoff, job.attempts);
|
|
732
735
|
const nextAttemptAt = Date.now() + delay;
|