bullmq 3.0.0 → 3.1.0

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.
Files changed (50) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/classes/scripts.d.ts +2 -2
  3. package/dist/cjs/classes/scripts.js +36 -6
  4. package/dist/cjs/classes/scripts.js.map +1 -1
  5. package/dist/cjs/commands/moveToDelayed-8.lua +63 -0
  6. package/dist/cjs/commands/moveToFinished-12.lua +23 -12
  7. package/dist/{esm/commands/retryJob-6.lua → cjs/commands/retryJob-8.lua} +15 -8
  8. package/dist/cjs/enums/error-code.enum.d.ts +2 -1
  9. package/dist/cjs/enums/error-code.enum.js +1 -0
  10. package/dist/cjs/enums/error-code.enum.js.map +1 -1
  11. package/dist/cjs/scripts/index.d.ts +2 -2
  12. package/dist/cjs/scripts/index.js +2 -2
  13. package/dist/cjs/scripts/{moveToDelayed-5.d.ts → moveToDelayed-8.d.ts} +0 -0
  14. package/dist/cjs/scripts/moveToDelayed-8.js +116 -0
  15. package/dist/cjs/scripts/moveToDelayed-8.js.map +1 -0
  16. package/dist/cjs/scripts/moveToFinished-12.js +23 -12
  17. package/dist/cjs/scripts/moveToFinished-12.js.map +1 -1
  18. package/dist/cjs/scripts/{retryJob-6.d.ts → retryJob-8.d.ts} +0 -0
  19. package/dist/cjs/scripts/retryJob-8.js +112 -0
  20. package/dist/cjs/scripts/retryJob-8.js.map +1 -0
  21. package/dist/esm/classes/scripts.d.ts +2 -2
  22. package/dist/esm/classes/scripts.js +36 -6
  23. package/dist/esm/classes/scripts.js.map +1 -1
  24. package/dist/esm/commands/moveToDelayed-8.lua +63 -0
  25. package/dist/esm/commands/moveToFinished-12.lua +23 -12
  26. package/dist/{cjs/commands/retryJob-6.lua → esm/commands/retryJob-8.lua} +15 -8
  27. package/dist/esm/enums/error-code.enum.d.ts +2 -1
  28. package/dist/esm/enums/error-code.enum.js +1 -0
  29. package/dist/esm/enums/error-code.enum.js.map +1 -1
  30. package/dist/esm/scripts/index.d.ts +2 -2
  31. package/dist/esm/scripts/index.js +2 -2
  32. package/dist/esm/scripts/{moveToDelayed-5.d.ts → moveToDelayed-8.d.ts} +0 -0
  33. package/dist/esm/scripts/moveToDelayed-8.js +113 -0
  34. package/dist/esm/scripts/moveToDelayed-8.js.map +1 -0
  35. package/dist/esm/scripts/moveToFinished-12.js +23 -12
  36. package/dist/esm/scripts/moveToFinished-12.js.map +1 -1
  37. package/dist/esm/scripts/{retryJob-6.d.ts → retryJob-8.d.ts} +0 -0
  38. package/dist/esm/scripts/retryJob-8.js +109 -0
  39. package/dist/esm/scripts/retryJob-8.js.map +1 -0
  40. package/package.json +1 -1
  41. package/dist/cjs/commands/moveToDelayed-5.lua +0 -54
  42. package/dist/cjs/scripts/moveToDelayed-5.js +0 -52
  43. package/dist/cjs/scripts/moveToDelayed-5.js.map +0 -1
  44. package/dist/cjs/scripts/retryJob-6.js +0 -60
  45. package/dist/cjs/scripts/retryJob-6.js.map +0 -1
  46. package/dist/esm/commands/moveToDelayed-5.lua +0 -54
  47. package/dist/esm/scripts/moveToDelayed-5.js +0 -49
  48. package/dist/esm/scripts/moveToDelayed-5.js.map +0 -1
  49. package/dist/esm/scripts/retryJob-6.js +0 -57
  50. package/dist/esm/scripts/retryJob-6.js.map +0 -1
package/README.md CHANGED
@@ -159,7 +159,7 @@ This is just scratching the surface, check all the features and more in the offi
159
159
 
160
160
  Since there are a few job queue solutions, here is a table comparing them:
161
161
 
162
- | Feature | Bullmq-Pro | Bullmq | Bull | Kue | Bee | Agenda |
162
+ | Feature | BullMQ-Pro | BullMQ | Bull | Kue | Bee | Agenda |
163
163
  | :------------------------ | :-------------: | :-------------: | :-------------: | :---: | -------- | ------ |
164
164
  | Backend | redis | redis | redis | redis | redis | mongo |
165
165
  | Observables | ✓ | | | | | |
@@ -36,7 +36,7 @@ export declare class Scripts {
36
36
  getState(jobId: string): Promise<JobState | 'unknown'>;
37
37
  changeDelay(jobId: string, delay: number): Promise<void>;
38
38
  private changeDelayArgs;
39
- moveToDelayedArgs(jobId: string, timestamp: number, token: string): string[];
39
+ moveToDelayedArgs(jobId: string, timestamp: number, token: string): (string | number)[];
40
40
  moveToWaitingChildrenArgs(jobId: string, token: string, opts?: MoveToWaitingChildrenOpts): string[];
41
41
  moveToDelayed(jobId: string, timestamp: number, token?: string): Promise<void>;
42
42
  /**
@@ -57,7 +57,7 @@ export declare class Scripts {
57
57
  * @returns Id jobs from the deleted records.
58
58
  */
59
59
  cleanJobsInSet(set: string, timestamp: number, limit?: number): Promise<string[]>;
60
- retryJobArgs(jobId: string, lifo: boolean, token: string): string[];
60
+ retryJobArgs(jobId: string, lifo: boolean, token: string): (string | number)[];
61
61
  protected retryJobsArgs(state: FinishedStatus, count: number, timestamp: number): (string | number)[];
62
62
  retryJobs(state?: FinishedStatus, count?: number, timestamp?: number): Promise<number>;
63
63
  /**
@@ -212,6 +212,8 @@ class Scripts {
212
212
  return new Error(`Job ${jobId} has pending dependencies. ${command}`);
213
213
  case enums_1.ErrorCode.ParentJobNotExist:
214
214
  return new Error(`Missing key for parent job ${jobId}. ${command}`);
215
+ case enums_1.ErrorCode.JobLockMismatch:
216
+ return new Error(`Lock mismatch for job ${jobId}. Cmd ${command} from ${state}`);
215
217
  default:
216
218
  return new Error(`Unknown code ${code} error for ${jobId}. ${command}`);
217
219
  }
@@ -303,11 +305,27 @@ class Scripts {
303
305
  if (timestamp > 0) {
304
306
  timestamp = timestamp * 0x1000 + (+jobId & 0xfff);
305
307
  }
306
- const keys = ['active', 'delayed', jobId].map(name => {
308
+ const keys = [
309
+ 'wait',
310
+ 'active',
311
+ 'priority',
312
+ 'delayed',
313
+ jobId,
314
+ ].map(name => {
307
315
  return this.queue.toKey(name);
308
316
  });
309
- keys.push.apply(keys, [this.queue.keys.events, this.queue.keys.delay]);
310
- return keys.concat([JSON.stringify(timestamp), jobId, token]);
317
+ keys.push.apply(keys, [
318
+ this.queue.keys.events,
319
+ this.queue.keys.paused,
320
+ this.queue.keys.meta,
321
+ ]);
322
+ return keys.concat([
323
+ this.queue.keys[''],
324
+ Date.now(),
325
+ JSON.stringify(timestamp),
326
+ jobId,
327
+ token,
328
+ ]);
311
329
  }
312
330
  moveToWaitingChildrenArgs(jobId, token, opts) {
313
331
  const timestamp = Date.now();
@@ -371,12 +389,24 @@ class Scripts {
371
389
  ]);
372
390
  }
373
391
  retryJobArgs(jobId, lifo, token) {
374
- const keys = ['active', 'wait', 'paused', jobId, 'meta'].map(name => {
392
+ const keys = [
393
+ 'active',
394
+ 'wait',
395
+ 'paused',
396
+ jobId,
397
+ 'meta',
398
+ ].map(name => {
375
399
  return this.queue.toKey(name);
376
400
  });
377
- keys.push(this.queue.keys.events);
401
+ keys.push(this.queue.keys.events, this.queue.keys.delayed, this.queue.keys.priority);
378
402
  const pushCmd = (lifo ? 'R' : 'L') + 'PUSH';
379
- return keys.concat([pushCmd, jobId, token]);
403
+ return keys.concat([
404
+ this.queue.toKey(''),
405
+ Date.now(),
406
+ pushCmd,
407
+ jobId,
408
+ token,
409
+ ]);
380
410
  }
381
411
  retryJobsArgs(state, count, timestamp) {
382
412
  const keys = [
@@ -1 +1 @@
1
- {"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../../src/classes/scripts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oBAAoB;AACpB,YAAY,CAAC;;;AACb,uCAAiC;AAEjC,MAAM,MAAM,GAAG,IAAI,gBAAK,CAAC;IACvB,UAAU,EAAE,KAAK;IACjB,oBAAoB,EAAE,IAAI;CAC3B,CAAC,CAAC;AAEH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;AAezB,oCAAqC;AACrC,oCAA4E;AA2B5E,MAAa,OAAO;IAClB,YAAsB,KAAmB;QAAnB,UAAK,GAAL,KAAK,CAAc;IAAG,CAAC;IAE7C,KAAK,CAAC,WAAW,CAAC,OAAe,EAAE,KAAa;QAC9C,MAAM,MAAM,GAAG,MAAM,IAAI,CAA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,IAAI,MAAM,GAAG,CAAC,EAAE;YACd,QAAQ,MAAM,EAAE;gBACd,KAAK,CAAC,CAAC;oBACL,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;gBACxD,KAAK,CAAC,CAAC;oBACL,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;aAC/D;SACF;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CAgCF;AA5zBD,0BA4zBC;AAED,SAAgB,eAAe,CAAC,GAAU;IACxC,IAAI,GAAG,EAAE;QACP,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9C,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE;YACV,MAAM,CAAC,CAAC,CAAC,GAAG,IAAA,iBAAS,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;SAC/B;QACD,OAAO,MAAM,CAAC;KACf;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AATD,0CASC"}
@@ -0,0 +1,63 @@
1
+ --[[
2
+ Moves job from active to delayed set.
3
+
4
+ Input:
5
+ KEYS[1] wait key
6
+ KEYS[2] active key
7
+ KEYS[3] priority key
8
+ KEYS[4] delayed key
9
+ KEYS[5] job key
10
+ KEYS[6] events stream
11
+ KEYS[7] paused key
12
+ KEYS[8] meta key
13
+
14
+ ARGV[1] key prefix
15
+ ARGV[2] timestamp
16
+ ARGV[3] delayedTimestamp
17
+ ARGV[4] the id of the job
18
+ ARGV[5] queue token
19
+
20
+ Output:
21
+ 0 - OK
22
+ -1 - Missing job.
23
+ -3 - Job not in active set.
24
+
25
+ Events:
26
+ - delayed key.
27
+ ]]
28
+ local rcall = redis.call
29
+
30
+ -- Includes
31
+ --- @include "includes/promoteDelayedJobs"
32
+
33
+ promoteDelayedJobs(KEYS[4], KEYS[1], KEYS[3], KEYS[7], KEYS[8], KEYS[6], ARGV[1], ARGV[2])
34
+
35
+ if rcall("EXISTS", KEYS[5]) == 1 then
36
+
37
+ if ARGV[5] ~= "0" then
38
+ local lockKey = KEYS[5] .. ':lock'
39
+ if rcall("GET", lockKey) == ARGV[5] then
40
+ rcall("DEL", lockKey)
41
+ else
42
+ return -2
43
+ end
44
+ end
45
+
46
+ local jobId = ARGV[4]
47
+ local score = tonumber(ARGV[3])
48
+ local delayedTimestamp = (score / 0x1000)
49
+
50
+ local numRemovedElements = rcall("LREM", KEYS[2], -1, jobId)
51
+
52
+ if(numRemovedElements < 1) then
53
+ return -3
54
+ end
55
+
56
+ rcall("ZADD", KEYS[4], score, jobId)
57
+
58
+ rcall("XADD", KEYS[6], "*", "event", "delayed", "jobId", jobId, "delay", delayedTimestamp);
59
+
60
+ return 0
61
+ else
62
+ return -1
63
+ end
@@ -48,6 +48,7 @@
48
48
  -2 Missing lock.
49
49
  -3 Job not in active set
50
50
  -4 Job has pending dependencies
51
+ -6 Lock is not owned by this client
51
52
 
52
53
  Events:
53
54
  'completed/failed'
@@ -82,11 +83,19 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
82
83
 
83
84
  if token ~= "0" then
84
85
  local lockKey = jobIdKey .. ':lock'
85
- if rcall("GET", lockKey) == token then
86
+ local lockToken = rcall("GET", lockKey)
87
+ if lockToken == token then
86
88
  rcall("DEL", lockKey)
87
89
  rcall("SREM", KEYS[5], ARGV[1])
88
90
  else
89
- return -2
91
+ if lockToken then
92
+ rcall("SET", "DEBUG", lockToken)
93
+ -- Lock exists but token does not match
94
+ return -6
95
+ else
96
+ -- Lock is missing completely
97
+ return -2
98
+ end
90
99
  end
91
100
  end
92
101
 
@@ -118,11 +127,13 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
118
127
  if ARGV[5] == "completed" then
119
128
  local dependenciesSet = parentKey .. ":dependencies"
120
129
  if rcall("SREM", dependenciesSet, jobIdKey) == 1 then
121
- updateParentDepsIfNeeded(parentKey, parentQueueKey, dependenciesSet,
122
- parentId, jobIdKey, ARGV[4])
130
+ updateParentDepsIfNeeded(parentKey, parentQueueKey,
131
+ dependenciesSet, parentId, jobIdKey,
132
+ ARGV[4])
123
133
  end
124
134
  elseif opts['fpof'] then
125
- moveParentFromWaitingChildrenToFailed(parentQueueKey, parentKey, parentId, jobIdKey, timestamp)
135
+ moveParentFromWaitingChildrenToFailed(parentQueueKey, parentKey,
136
+ parentId, jobIdKey, timestamp)
126
137
  end
127
138
  end
128
139
 
@@ -160,7 +171,7 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
160
171
 
161
172
  -- Collect metrics
162
173
  if maxMetricsSize ~= "" then
163
- collectMetrics(KEYS[12], KEYS[12]..':data', maxMetricsSize, timestamp)
174
+ collectMetrics(KEYS[12], KEYS[12] .. ':data', maxMetricsSize, timestamp)
164
175
  end
165
176
 
166
177
  -- Try to get next job to avoid an extra roundtrip if the queue is not closing,
@@ -168,20 +179,20 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
168
179
  if (ARGV[7] == "1") then
169
180
 
170
181
  -- Check if there are delayed jobs that can be promoted
171
- promoteDelayedJobs(KEYS[7], KEYS[1], KEYS[3], KEYS[8], KEYS[11], KEYS[4], ARGV[8], timestamp)
182
+ promoteDelayedJobs(KEYS[7], KEYS[1], KEYS[3], KEYS[8], KEYS[11],
183
+ KEYS[4], ARGV[8], timestamp)
172
184
 
173
185
  -- Check if we are rate limited first.
174
186
  local pttl = getRateLimitTTL(opts, KEYS[6])
175
- if pttl > 0 then
176
- return { 0, 0, pttl }
177
- end
187
+ if pttl > 0 then return {0, 0, pttl} end
178
188
 
179
189
  jobId = rcall("RPOPLPUSH", KEYS[1], KEYS[2])
180
190
 
181
191
  if jobId == "0" then
182
192
  rcall("LREM", KEYS[2], 1, 0)
183
193
  elseif jobId then
184
- return moveJobFromWaitToActive(KEYS, ARGV[8], jobId, timestamp, opts)
194
+ return
195
+ moveJobFromWaitToActive(KEYS, ARGV[8], jobId, timestamp, opts)
185
196
  end
186
197
 
187
198
  -- Return the timestamp for the next delayed job if any.
@@ -200,7 +211,7 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
200
211
  if activeLen == 0 then
201
212
  rcall("XADD", KEYS[4], "*", "event", "drained")
202
213
  end
203
- end
214
+ end
204
215
 
205
216
  return 0
206
217
  else
@@ -8,10 +8,14 @@
8
8
  KEYS[4] job key
9
9
  KEYS[5] 'meta'
10
10
  KEYS[6] events stream
11
+ KEYS[7] delayed key
12
+ KEYS[8] priority key
11
13
 
12
- ARGV[1] pushCmd
13
- ARGV[2] jobId
14
- ARGV[3] token
14
+ ARGV[1] key prefix
15
+ ARGV[2] timestamp
16
+ ARGV[3] pushCmd
17
+ ARGV[4] jobId
18
+ ARGV[5] token
15
19
 
16
20
  Events:
17
21
  'waiting'
@@ -25,12 +29,15 @@ local rcall = redis.call
25
29
 
26
30
  -- Includes
27
31
  --- @include "includes/getTargetQueueList"
32
+ --- @include "includes/promoteDelayedJobs"
33
+
34
+ promoteDelayedJobs(KEYS[7], KEYS[2], KEYS[8], KEYS[3], KEYS[5], KEYS[6], ARGV[1], ARGV[2])
28
35
 
29
36
  if rcall("EXISTS", KEYS[4]) == 1 then
30
37
 
31
- if ARGV[3] ~= "0" then
38
+ if ARGV[5] ~= "0" then
32
39
  local lockKey = KEYS[4] .. ':lock'
33
- if rcall("GET", lockKey) == ARGV[3] then
40
+ if rcall("GET", lockKey) == ARGV[5] then
34
41
  rcall("DEL", lockKey)
35
42
  else
36
43
  return -2
@@ -39,11 +46,11 @@ if rcall("EXISTS", KEYS[4]) == 1 then
39
46
 
40
47
  local target = getTargetQueueList(KEYS[5], KEYS[2], KEYS[3])
41
48
 
42
- rcall("LREM", KEYS[1], 0, ARGV[2])
43
- rcall(ARGV[1], target, ARGV[2])
49
+ rcall("LREM", KEYS[1], 0, ARGV[4])
50
+ rcall(ARGV[3], target, ARGV[4])
44
51
 
45
52
  -- Emit waiting event
46
- rcall("XADD", KEYS[6], "*", "event", "waiting", "jobId", ARGV[2], "prev", "failed");
53
+ rcall("XADD", KEYS[6], "*", "event", "waiting", "jobId", ARGV[4], "prev", "failed");
47
54
 
48
55
  return 0
49
56
  else
@@ -3,5 +3,6 @@ export declare enum ErrorCode {
3
3
  JobLockNotExist = -2,
4
4
  JobNotInState = -3,
5
5
  JobPendingDependencies = -4,
6
- ParentJobNotExist = -5
6
+ ParentJobNotExist = -5,
7
+ JobLockMismatch = -6
7
8
  }
@@ -8,5 +8,6 @@ var ErrorCode;
8
8
  ErrorCode[ErrorCode["JobNotInState"] = -3] = "JobNotInState";
9
9
  ErrorCode[ErrorCode["JobPendingDependencies"] = -4] = "JobPendingDependencies";
10
10
  ErrorCode[ErrorCode["ParentJobNotExist"] = -5] = "ParentJobNotExist";
11
+ ErrorCode[ErrorCode["JobLockMismatch"] = -6] = "JobLockMismatch";
11
12
  })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
12
13
  //# sourceMappingURL=error-code.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-code.enum.js","sourceRoot":"","sources":["../../../src/enums/error-code.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,wDAAgB,CAAA;IAChB,gEAAoB,CAAA;IACpB,4DAAkB,CAAA;IAClB,8EAA2B,CAAA;IAC3B,oEAAsB,CAAA;AACxB,CAAC,EANW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMpB"}
1
+ {"version":3,"file":"error-code.enum.js","sourceRoot":"","sources":["../../../src/enums/error-code.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,wDAAgB,CAAA;IAChB,gEAAoB,CAAA;IACpB,4DAAkB,CAAA;IAClB,8EAA2B,CAAA;IAC3B,oEAAsB,CAAA;IACtB,gEAAoB,CAAA;AACtB,CAAC,EAPW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAOpB"}
@@ -9,7 +9,7 @@ export * from './isFinished-3';
9
9
  export * from './isJobInList-1';
10
10
  export * from './moveStalledJobsToWait-8';
11
11
  export * from './moveToActive-9';
12
- export * from './moveToDelayed-5';
12
+ export * from './moveToDelayed-8';
13
13
  export * from './moveToFinished-12';
14
14
  export * from './moveToWaitingChildren-4';
15
15
  export * from './obliterate-2';
@@ -19,7 +19,7 @@ export * from './releaseLock-1';
19
19
  export * from './removeJob-1';
20
20
  export * from './removeRepeatable-2';
21
21
  export * from './reprocessJob-4';
22
- export * from './retryJob-6';
22
+ export * from './retryJob-8';
23
23
  export * from './retryJobs-6';
24
24
  export * from './takeLock-1';
25
25
  export * from './updateData-1';
@@ -12,7 +12,7 @@ tslib_1.__exportStar(require("./isFinished-3"), exports);
12
12
  tslib_1.__exportStar(require("./isJobInList-1"), exports);
13
13
  tslib_1.__exportStar(require("./moveStalledJobsToWait-8"), exports);
14
14
  tslib_1.__exportStar(require("./moveToActive-9"), exports);
15
- tslib_1.__exportStar(require("./moveToDelayed-5"), exports);
15
+ tslib_1.__exportStar(require("./moveToDelayed-8"), exports);
16
16
  tslib_1.__exportStar(require("./moveToFinished-12"), exports);
17
17
  tslib_1.__exportStar(require("./moveToWaitingChildren-4"), exports);
18
18
  tslib_1.__exportStar(require("./obliterate-2"), exports);
@@ -22,7 +22,7 @@ tslib_1.__exportStar(require("./releaseLock-1"), exports);
22
22
  tslib_1.__exportStar(require("./removeJob-1"), exports);
23
23
  tslib_1.__exportStar(require("./removeRepeatable-2"), exports);
24
24
  tslib_1.__exportStar(require("./reprocessJob-4"), exports);
25
- tslib_1.__exportStar(require("./retryJob-6"), exports);
25
+ tslib_1.__exportStar(require("./retryJob-8"), exports);
26
26
  tslib_1.__exportStar(require("./retryJobs-6"), exports);
27
27
  tslib_1.__exportStar(require("./takeLock-1"), exports);
28
28
  tslib_1.__exportStar(require("./updateData-1"), exports);
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.moveToDelayed = void 0;
4
+ const content = `--[[
5
+ Moves job from active to delayed set.
6
+ Input:
7
+ KEYS[1] wait key
8
+ KEYS[2] active key
9
+ KEYS[3] priority key
10
+ KEYS[4] delayed key
11
+ KEYS[5] job key
12
+ KEYS[6] events stream
13
+ KEYS[7] paused key
14
+ KEYS[8] meta key
15
+ ARGV[1] key prefix
16
+ ARGV[2] timestamp
17
+ ARGV[3] delayedTimestamp
18
+ ARGV[4] the id of the job
19
+ ARGV[5] queue token
20
+ Output:
21
+ 0 - OK
22
+ -1 - Missing job.
23
+ -3 - Job not in active set.
24
+ Events:
25
+ - delayed key.
26
+ ]]
27
+ local rcall = redis.call
28
+ -- Includes
29
+ --[[
30
+ Updates the delay set, by moving delayed jobs that should
31
+ be processed now to "wait".
32
+ Events:
33
+ 'waiting'
34
+ ]]
35
+ local rcall = redis.call
36
+ -- Includes
37
+ --[[
38
+ Function to add job considering priority.
39
+ ]]
40
+ local function addJobWithPriority(priorityKey, priority, targetKey, jobId)
41
+ rcall("ZADD", priorityKey, priority, jobId)
42
+ local count = rcall("ZCOUNT", priorityKey, 0, priority)
43
+ local len = rcall("LLEN", targetKey)
44
+ local id = rcall("LINDEX", targetKey, len - (count - 1))
45
+ if id then
46
+ rcall("LINSERT", targetKey, "BEFORE", id, jobId)
47
+ else
48
+ rcall("RPUSH", targetKey, jobId)
49
+ end
50
+ end
51
+ --[[
52
+ Function to check for the meta.paused key to decide if we are paused or not
53
+ (since an empty list and !EXISTS are not really the same).
54
+ ]]
55
+ local function getTargetQueueList(queueMetaKey, waitKey, pausedKey)
56
+ if rcall("HEXISTS", queueMetaKey, "paused") ~= 1 then
57
+ return waitKey
58
+ else
59
+ return pausedKey
60
+ end
61
+ end
62
+ -- Try to get as much as 1000 jobs at once, and returns the nextTimestamp if
63
+ -- there are more delayed jobs to process.
64
+ local function promoteDelayedJobs(delayedKey, waitKey, priorityKey, pausedKey,
65
+ metaKey, eventStreamKey, prefix, timestamp)
66
+ local jobs = rcall("ZRANGEBYSCORE", delayedKey, 0, (timestamp + 1) * 0x1000, "LIMIT", 0, 1000)
67
+ if (#jobs > 0) then
68
+ rcall("ZREM", delayedKey, unpack(jobs))
69
+ -- check if we need to use push in paused instead of waiting
70
+ local target = getTargetQueueList(metaKey, waitKey, pausedKey)
71
+ for _, jobId in ipairs(jobs) do
72
+ local priority =
73
+ tonumber(rcall("HGET", prefix .. jobId, "priority")) or 0
74
+ if priority == 0 then
75
+ -- LIFO or FIFO
76
+ rcall("LPUSH", target, jobId)
77
+ else
78
+ addJobWithPriority(priorityKey, priority, target, jobId)
79
+ end
80
+ -- Emit waiting event
81
+ rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId",
82
+ jobId, "prev", "delayed")
83
+ rcall("HSET", prefix .. jobId, "delay", 0)
84
+ end
85
+ end
86
+ end
87
+ promoteDelayedJobs(KEYS[4], KEYS[1], KEYS[3], KEYS[7], KEYS[8], KEYS[6], ARGV[1], ARGV[2])
88
+ if rcall("EXISTS", KEYS[5]) == 1 then
89
+ if ARGV[5] ~= "0" then
90
+ local lockKey = KEYS[5] .. ':lock'
91
+ if rcall("GET", lockKey) == ARGV[5] then
92
+ rcall("DEL", lockKey)
93
+ else
94
+ return -2
95
+ end
96
+ end
97
+ local jobId = ARGV[4]
98
+ local score = tonumber(ARGV[3])
99
+ local delayedTimestamp = (score / 0x1000)
100
+ local numRemovedElements = rcall("LREM", KEYS[2], -1, jobId)
101
+ if(numRemovedElements < 1) then
102
+ return -3
103
+ end
104
+ rcall("ZADD", KEYS[4], score, jobId)
105
+ rcall("XADD", KEYS[6], "*", "event", "delayed", "jobId", jobId, "delay", delayedTimestamp);
106
+ return 0
107
+ else
108
+ return -1
109
+ end
110
+ `;
111
+ exports.moveToDelayed = {
112
+ name: 'moveToDelayed',
113
+ content,
114
+ keys: 8,
115
+ };
116
+ //# sourceMappingURL=moveToDelayed-8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moveToDelayed-8.js","sourceRoot":"","sources":["../../../src/scripts/moveToDelayed-8.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Gf,CAAC;AACW,QAAA,aAAa,GAAG;IAC3B,IAAI,EAAE,eAAe;IACrB,OAAO;IACP,IAAI,EAAE,CAAC;CACR,CAAC"}
@@ -44,6 +44,7 @@ const content = `--[[
44
44
  -2 Missing lock.
45
45
  -3 Job not in active set
46
46
  -4 Job has pending dependencies
47
+ -6 Lock is not owned by this client
47
48
  Events:
48
49
  'completed/failed'
49
50
  ]]
@@ -427,11 +428,19 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
427
428
  local maxAge = opts['keepJobs']['age']
428
429
  if token ~= "0" then
429
430
  local lockKey = jobIdKey .. ':lock'
430
- if rcall("GET", lockKey) == token then
431
+ local lockToken = rcall("GET", lockKey)
432
+ if lockToken == token then
431
433
  rcall("DEL", lockKey)
432
434
  rcall("SREM", KEYS[5], ARGV[1])
433
435
  else
434
- return -2
436
+ if lockToken then
437
+ rcall("SET", "DEBUG", lockToken)
438
+ -- Lock exists but token does not match
439
+ return -6
440
+ else
441
+ -- Lock is missing completely
442
+ return -2
443
+ end
435
444
  end
436
445
  end
437
446
  if rcall("SCARD", jobIdKey .. ":dependencies") ~= 0 then -- // Make sure it does not have pending dependencies
@@ -457,11 +466,13 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
457
466
  if ARGV[5] == "completed" then
458
467
  local dependenciesSet = parentKey .. ":dependencies"
459
468
  if rcall("SREM", dependenciesSet, jobIdKey) == 1 then
460
- updateParentDepsIfNeeded(parentKey, parentQueueKey, dependenciesSet,
461
- parentId, jobIdKey, ARGV[4])
469
+ updateParentDepsIfNeeded(parentKey, parentQueueKey,
470
+ dependenciesSet, parentId, jobIdKey,
471
+ ARGV[4])
462
472
  end
463
473
  elseif opts['fpof'] then
464
- moveParentFromWaitingChildrenToFailed(parentQueueKey, parentKey, parentId, jobIdKey, timestamp)
474
+ moveParentFromWaitingChildrenToFailed(parentQueueKey, parentKey,
475
+ parentId, jobIdKey, timestamp)
465
476
  end
466
477
  end
467
478
  -- Remove job?
@@ -492,23 +503,23 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
492
503
  end
493
504
  -- Collect metrics
494
505
  if maxMetricsSize ~= "" then
495
- collectMetrics(KEYS[12], KEYS[12]..':data', maxMetricsSize, timestamp)
506
+ collectMetrics(KEYS[12], KEYS[12] .. ':data', maxMetricsSize, timestamp)
496
507
  end
497
508
  -- Try to get next job to avoid an extra roundtrip if the queue is not closing,
498
509
  -- and not rate limited.
499
510
  if (ARGV[7] == "1") then
500
511
  -- Check if there are delayed jobs that can be promoted
501
- promoteDelayedJobs(KEYS[7], KEYS[1], KEYS[3], KEYS[8], KEYS[11], KEYS[4], ARGV[8], timestamp)
512
+ promoteDelayedJobs(KEYS[7], KEYS[1], KEYS[3], KEYS[8], KEYS[11],
513
+ KEYS[4], ARGV[8], timestamp)
502
514
  -- Check if we are rate limited first.
503
515
  local pttl = getRateLimitTTL(opts, KEYS[6])
504
- if pttl > 0 then
505
- return { 0, 0, pttl }
506
- end
516
+ if pttl > 0 then return {0, 0, pttl} end
507
517
  jobId = rcall("RPOPLPUSH", KEYS[1], KEYS[2])
508
518
  if jobId == "0" then
509
519
  rcall("LREM", KEYS[2], 1, 0)
510
520
  elseif jobId then
511
- return moveJobFromWaitToActive(KEYS, ARGV[8], jobId, timestamp, opts)
521
+ return
522
+ moveJobFromWaitToActive(KEYS, ARGV[8], jobId, timestamp, opts)
512
523
  end
513
524
  -- Return the timestamp for the next delayed job if any.
514
525
  local nextTimestamp = getNextDelayedTimestamp(KEYS[7])
@@ -524,7 +535,7 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists
524
535
  if activeLen == 0 then
525
536
  rcall("XADD", KEYS[4], "*", "event", "drained")
526
537
  end
527
- end
538
+ end
528
539
  return 0
529
540
  else
530
541
  return -1