diff --git a/docs/gitbook/bullmq-pro/changelog.md b/docs/gitbook/bullmq-pro/changelog.md index 7d05cf4239..aed28eaaa7 100644 --- a/docs/gitbook/bullmq-pro/changelog.md +++ b/docs/gitbook/bullmq-pro/changelog.md @@ -1,3 +1,44 @@ +## [6.2.2](https://github.com/taskforcesh/bullmq-pro/compare/v6.2.1...v6.2.2) (2023-07-26) + + +### Bug Fixes + +* **deps:** upgrade bullmq to 4.6.0 ([#167](https://github.com/taskforcesh/bullmq-pro/issues/167)) ([9cf92a6](https://github.com/taskforcesh/bullmq-pro/commit/9cf92a62dc3f1e9316bd4559fde4700ff4d9b12c)) + +## [6.2.1](https://github.com/taskforcesh/bullmq-pro/compare/v6.2.0...v6.2.1) (2023-07-25) + + +### Bug Fixes + +* **flow:** emit delayed event when parent is moved to delayed ([#166](https://github.com/taskforcesh/bullmq-pro/issues/166)) ([38afe1c](https://github.com/taskforcesh/bullmq-pro/commit/38afe1cf3187ddee33d33a39438587d921b8743a)) + +# [6.2.0](https://github.com/taskforcesh/bullmq-pro/compare/v6.1.1...v6.2.0) (2023-07-25) + + +### Features + +* **groups:** support local priorities ([#156](https://github.com/taskforcesh/bullmq-pro/issues/156)) ([260bd24](https://github.com/taskforcesh/bullmq-pro/commit/260bd24a76d703ec87385c05cdd3b4589f142aa8)), closes [taskforcesh/bullmq-pro-support#23](https://github.com/taskforcesh/bullmq-pro-support/issues/23) [taskforcesh/bullmq-pro-support#13](https://github.com/taskforcesh/bullmq-pro-support/issues/13) + +## [6.1.1](https://github.com/taskforcesh/bullmq-pro/compare/v6.1.0...v6.1.1) (2023-07-18) + + +### Bug Fixes + +* add missing error export ([2b8c51f](https://github.com/taskforcesh/bullmq-pro/commit/2b8c51fd43c538fd3eed122ab96d55325da97b90)) + +# [6.1.0](https://github.com/taskforcesh/bullmq-pro/compare/v6.0.5...v6.1.0) (2023-07-18) + + +### Bug Fixes + +* fix the GroupMaxSizeExceededError prototype ([a1b6a96](https://github.com/taskforcesh/bullmq-pro/commit/a1b6a96f1a0b632940177a1057a4995d59957964)) + + +### Features + +* add getGroupStatus ([3bac19d](https://github.com/taskforcesh/bullmq-pro/commit/3bac19d32e9a620a393736152844973951e45d47)) +* add support max sized groups ([7bc654c](https://github.com/taskforcesh/bullmq-pro/commit/7bc654c2191c9a2e8c80f4e0843c4beda7d61565)) + ## [6.0.5](https://github.com/taskforcesh/bullmq-pro/compare/v6.0.4...v6.0.5) (2023-07-11) diff --git a/src/classes/scripts.ts b/src/classes/scripts.ts index d6d6acd2a6..50a8cf0f91 100644 --- a/src/classes/scripts.ts +++ b/src/classes/scripts.ts @@ -750,7 +750,7 @@ export class Scripts { ]); } - protected retryJobsArgs( + protected moveJobsToWaitArgs( state: FinishedStatus | 'delayed', count: number, timestamp: number, @@ -776,7 +776,7 @@ export class Scripts { ): Promise { const client = await this.queue.client; - const args = this.retryJobsArgs(state, count, timestamp); + const args = this.moveJobsToWaitArgs(state, count, timestamp); return (client).moveJobsToWait(args); } @@ -784,7 +784,7 @@ export class Scripts { async promoteJobs(count = 1000): Promise { const client = await this.queue.client; - const args = this.retryJobsArgs('delayed', count, Number.MAX_VALUE); + const args = this.moveJobsToWaitArgs('delayed', count, Number.MAX_VALUE); return (client).moveJobsToWait(args); } diff --git a/src/commands/moveJobsToWait-6.lua b/src/commands/moveJobsToWait-6.lua index 03e32a72c8..7cf564807b 100644 --- a/src/commands/moveJobsToWait-6.lua +++ b/src/commands/moveJobsToWait-6.lua @@ -34,12 +34,12 @@ local target = getTargetQueueList(metaKey, KEYS[4], KEYS[5]) local jobs = rcall('ZRANGEBYSCORE', KEYS[3], 0, timestamp, 'LIMIT', 0, maxCount) if (#jobs > 0) then - if KEYS[3]:match("failed$") then + if ARGV[3] == "failed" then for i, key in ipairs(jobs) do local jobKey = KEYS[1] .. key rcall("HDEL", jobKey, "finishedOn", "processedOn", "failedReason") end - elseif KEYS[3]:match("completed$") then + elseif ARGV[3] == "completed" then for i, key in ipairs(jobs) do local jobKey = KEYS[1] .. key rcall("HDEL", jobKey, "finishedOn", "processedOn", "returnvalue") diff --git a/src/commands/moveToFinished-13.lua b/src/commands/moveToFinished-13.lua index a984f1662b..02293cbffd 100644 --- a/src/commands/moveToFinished-13.lua +++ b/src/commands/moveToFinished-13.lua @@ -150,7 +150,7 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists if rcall("SREM", dependenciesSet, jobIdKey) == 1 then moveParentToWaitIfNeeded(parentQueueKey, dependenciesSet, parentKey, parentId, timestamp) - end + end end end end