Skip to content

Commit

Permalink
docs(bullmq-pro): update changelog to v7.17.2 (#2856)
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf authored Oct 23, 2024
1 parent 0ff74d4 commit a615c6d
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 23 deletions.
15 changes: 15 additions & 0 deletions docs/gitbook/bullmq-pro/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## [7.17.2](https://github.com/taskforcesh/bullmq-pro/compare/v7.17.1...v7.17.2) (2024-10-23)


### Bug Fixes

* **repeatable:** export RepeatOptions ([#261](https://github.com/taskforcesh/bullmq-pro/issues/261)) ([b620bdf](https://github.com/taskforcesh/bullmq-pro/commit/b620bdf4f7449ad20f0ffd07786880115ec77fd9))
* **sandbox:** fix serialization of error with circular references are present ([#2815](https://github.com/taskforcesh/bullmq/issues/2815)) fix [#2813](https://github.com/taskforcesh/bullmq/issues/2813) ([a384d92](https://github.com/taskforcesh/bullmq/commit/a384d926bee15bffa84178a8fad7b94a6a08b572))

## [7.17.1](https://github.com/taskforcesh/bullmq-pro/compare/v7.17.0...v7.17.1) (2024-10-18)


### Bug Fixes

* **worker-pro:** use JobPro as part of WorkerProListener events ([#260](https://github.com/taskforcesh/bullmq-pro/issues/260)) ([966ac9c](https://github.com/taskforcesh/bullmq-pro/commit/966ac9cb41088c13a917450814ed9f6b48b79a9b))

# [7.17.0](https://github.com/taskforcesh/bullmq-pro/compare/v7.16.0...v7.17.0) (2024-10-12)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

-- Includes
--- @include "moveParentToWaitIfNeeded"
--- @include "removeDebounceKeyIfNeeded"
--- @include "removeDeduplicationKeyIfNeeded"

local function moveParentFromWaitingChildrenToFailed( parentQueueKey, parentKey, parentId, jobIdKey, timestamp)
if rcall("ZREM", parentQueueKey .. ":waiting-children", parentId) == 1 then
Expand All @@ -16,7 +16,7 @@ local function moveParentFromWaitingChildrenToFailed( parentQueueKey, parentKey,

local jobAttributes = rcall("HMGET", parentKey, "parent", "deid")

removeDebounceKeyIfNeeded(parentQueueKey .. ":", jobAttributes[2])
removeDeduplicationKeyIfNeeded(parentQueueKey .. ":", jobAttributes[2])

if jobAttributes[1] then
local parentData = cjson.decode(jobAttributes[1])
Expand Down
14 changes: 0 additions & 14 deletions src/commands/includes/removeDebounceKeyIfNeeded.lua

This file was deleted.

14 changes: 14 additions & 0 deletions src/commands/includes/removeDeduplicationKeyIfNeeded.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--[[
Function to remove deduplication key if needed.
]]

local function removeDeduplicationKeyIfNeeded(prefixKey, deduplicationId)
if deduplicationId then
local deduplicationKey = prefixKey .. "de:" .. deduplicationId
local pttl = rcall("PTTL", deduplicationKey)

if pttl == 0 or pttl == -1 then
rcall("DEL", deduplicationKey)
end
end
end
4 changes: 2 additions & 2 deletions src/commands/moveStalledJobsToWait-9.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ local rcall = redis.call
--- @include "includes/getTargetQueueList"
--- @include "includes/moveParentFromWaitingChildrenToFailed"
--- @include "includes/moveParentToWaitIfNeeded"
--- @include "includes/removeDebounceKeyIfNeeded"
--- @include "includes/removeDeduplicationKeyIfNeeded"
--- @include "includes/removeJob"
--- @include "includes/removeJobsByMaxAge"
--- @include "includes/removeJobsByMaxCount"
Expand Down Expand Up @@ -88,7 +88,7 @@ if (#stalling > 0) then
local opts = cjson.decode(rawOpts)
local removeOnFailType = type(opts["removeOnFail"])
rcall("ZADD", failedKey, timestamp, jobId)
removeDebounceKeyIfNeeded(queueKeyPrefix, jobAttributes[3])
removeDeduplicationKeyIfNeeded(queueKeyPrefix, jobAttributes[3])

local failedReason =
"job stalled more than allowable limit"
Expand Down
4 changes: 2 additions & 2 deletions src/commands/moveToFinished-14.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ local rcall = redis.call
--- @include "includes/moveParentToWaitIfNeeded"
--- @include "includes/prepareJobForProcessing"
--- @include "includes/promoteDelayedJobs"
--- @include "includes/removeDebounceKeyIfNeeded"
--- @include "includes/removeDeduplicationKeyIfNeeded"
--- @include "includes/removeJobKeys"
--- @include "includes/removeJobsByMaxAge"
--- @include "includes/removeJobsByMaxCount"
Expand Down Expand Up @@ -119,7 +119,7 @@ if rcall("EXISTS", jobIdKey) == 1 then -- // Make sure job exists

local prefix = ARGV[7]

removeDebounceKeyIfNeeded(prefix, jobAttributes[3])
removeDeduplicationKeyIfNeeded(prefix, jobAttributes[3])

-- If job has a parent we need to
-- 1) remove this job id from parents dependencies
Expand Down
6 changes: 3 additions & 3 deletions tests/test_queue.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { expect } from 'chai';
import { default as IORedis } from 'ioredis';
import { describe, beforeEach, it, before, after as afterAll } from 'mocha';
import { after } from 'lodash';
import * as sinon from 'sinon';
import { v4 } from 'uuid';
import { FlowProducer, Job, Queue, Worker } from '../src/classes';
import { delay, removeAllQueueData } from '../src/utils';
import { after } from 'lodash';
import { version as currentPackageVersion } from '../src/version';

describe('queues', function () {
const redisHost = process.env.REDIS_HOST || 'localhost';
Expand Down Expand Up @@ -39,8 +40,7 @@ describe('queues', function () {
it('should return the queue version', async () => {
const queue = new Queue(queueName, { connection });
const version = await queue.getVersion();
const { version: pkgJsonVersion, name } = require('../package.json');
expect(version).to.be.equal(`${name}:${pkgJsonVersion}`);
expect(version).to.be.equal(`bullmq:${currentPackageVersion}`);
return queue.close();
});

Expand Down

0 comments on commit a615c6d

Please sign in to comment.