@joystick.js/node-canary 0.0.0-canary.298 → 0.0.0-canary.299

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.
@@ -113,11 +113,10 @@ class Queue {
113
113
  }
114
114
  }
115
115
  if (!isNaN(job_definition?.maxAttempts)) {
116
- console.log({
117
- ...nextJob,
118
- maxAttempts: job_definition?.maxAttempts
119
- });
120
116
  if (nextJob?.attempts >= parseInt(job_definition?.maxAttempts, 10)) {
117
+ if (typeof job_definition?.onMaxAttemptsExhausted === "function") {
118
+ await job_definition.onMaxAttemptsExhausted(nextJob);
119
+ }
121
120
  return this._handleDeleteJob(nextJob?._id);
122
121
  }
123
122
  }
@@ -142,10 +141,6 @@ class Queue {
142
141
  return this.db.setJobCompleted(jobId);
143
142
  }
144
143
  _handleJobFailed(nextJob = {}, job_definition = {}, error = "") {
145
- console.log({
146
- nextJob,
147
- job_definition
148
- });
149
144
  if (job_definition?.requeueOnFailure) {
150
145
  return this._handleRequeueJob(nextJob, timestamps.get_future_time("seconds", 10));
151
146
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joystick.js/node-canary",
3
- "version": "0.0.0-canary.298",
3
+ "version": "0.0.0-canary.299",
4
4
  "type": "module",
5
5
  "description": "A Node.js framework for building web apps.",
6
6
  "main": "./dist/index.js",