diff --git a/docs/gitbook/changelog.md b/docs/gitbook/changelog.md index ffc4e71c90..ce42e01925 100644 --- a/docs/gitbook/changelog.md +++ b/docs/gitbook/changelog.md @@ -1,20 +1,9 @@ # [4.2.0](https://github.com/taskforcesh/bullmq/compare/v4.1.0...v4.2.0) (2023-07-03) -### Bug Fixes - -* **python:** add recommended pyproject.toml configuration ([#2029](https://github.com/taskforcesh/bullmq/issues/2029)) ([d03ffc9](https://github.com/taskforcesh/bullmq/commit/d03ffc9c98425a96d6e9dd47a6625382556a4cbf)) -* **python:** nuild egg-info at the root location ([3c2d06e](https://github.com/taskforcesh/bullmq/commit/3c2d06e7e6e0944135fe6bd8045d08dd43fe7d9c)) - - ### Features * **common:** add option to change repeatable jobs redis key hash algorithm ([#2023](https://github.com/taskforcesh/bullmq/issues/2023)) ([ca17364](https://github.com/taskforcesh/bullmq/commit/ca17364cc2a52f6577fb66f09ec3168bbf9f1e07)) -* **python:** add get job methods by state ([#2012](https://github.com/taskforcesh/bullmq/issues/2012)) ([57b2b72](https://github.com/taskforcesh/bullmq/commit/57b2b72f79afb683067d49170df5d2eed46e3712)) -* **python:** add getCompleted queue method ([#2033](https://github.com/taskforcesh/bullmq/issues/2033)) ([3e9db5e](https://github.com/taskforcesh/bullmq/commit/3e9db5ef4d868f8b420e368a711c20c2568a5910)) -* **python:** add getFailedCount queue method ([#2036](https://github.com/taskforcesh/bullmq/issues/2036)) ([92d7227](https://github.com/taskforcesh/bullmq/commit/92d7227bf5ec63a75b7af3fc7c312d9b4a81d69f)) -* **python:** add getJobs method in queue class ([#2011](https://github.com/taskforcesh/bullmq/issues/2011)) ([8d5d6c1](https://github.com/taskforcesh/bullmq/commit/8d5d6c14442b7b967c42cb6ec3907a4d1a5bd575)) -* **python:** add getJobState queue method ([#2040](https://github.com/taskforcesh/bullmq/issues/2040)) ([8ec9ed6](https://github.com/taskforcesh/bullmq/commit/8ec9ed67d2803224a3b866c51f67239a5c4b7042)) # [4.1.0](https://github.com/taskforcesh/bullmq/compare/v4.0.0...v4.1.0) (2023-06-23) diff --git a/docs/gitbook/python/changelog.md b/docs/gitbook/python/changelog.md index a591d81fc1..3b71c47bae 100644 --- a/docs/gitbook/python/changelog.md +++ b/docs/gitbook/python/changelog.md @@ -4,10 +4,7 @@ ## v1.4.0 (2023-06-30) ### Feature -* **python:** Add getJobState queue method ([#2040](https://github.com/taskforcesh/bullmq/issues/2040)) ([`8ec9ed6`](https://github.com/taskforcesh/bullmq/commit/8ec9ed67d2803224a3b866c51f67239a5c4b7042)) - -### Documentation -* **bullmq-pro:** Update changelog ([`b71e1ca`](https://github.com/taskforcesh/bullmq/commit/b71e1ca6b3bd77557a6c1219802faaeff8768392)) +* **queue:** Add getJobState method ([#2040](https://github.com/taskforcesh/bullmq/issues/2040)) ([`8ec9ed6`](https://github.com/taskforcesh/bullmq/commit/8ec9ed67d2803224a3b866c51f67239a5c4b7042)) ## v1.3.1 (2023-06-29) ### Fix @@ -32,7 +29,7 @@ ## v1.1.0 (2023-06-23) ### Feature -* **queue:** Add getJobs method in queue class ([#2011](https://github.com/taskforcesh/bullmq/issues/2011)) ([`8d5d6c1`](https://github.com/taskforcesh/bullmq/commit/8d5d6c14442b7b967c42cb6ec3907a4d1a5bd575)) +* **queue:** Add getJobs method ([#2011](https://github.com/taskforcesh/bullmq/issues/2011)) ([`8d5d6c1`](https://github.com/taskforcesh/bullmq/commit/8d5d6c14442b7b967c42cb6ec3907a4d1a5bd575)) ## v1.0.0 (2023-06-21) ### Breaking diff --git a/python/bullmq/queue.py b/python/bullmq/queue.py index 46d6b6b68e..9c9e6e9e90 100644 --- a/python/bullmq/queue.py +++ b/python/bullmq/queue.py @@ -63,7 +63,7 @@ async def isPaused(self): """ Returns true if the queue is currently paused. """ - paused_key_exists = await self.client.hexists(self.opts.get("prefix", f"bull:{self.name}:meta"), "paused") + paused_key_exists = await self.client.hexists(f"{self.prefix}:{self.name}:meta", "paused") return paused_key_exists == 1 async def obliterate(self, force: bool = False): diff --git a/python/tests/queue_tests.py b/python/tests/queue_tests.py index d0c0c604bc..bff7c56610 100644 --- a/python/tests/queue_tests.py +++ b/python/tests/queue_tests.py @@ -64,6 +64,36 @@ async def test_add_job_with_options(self): await queue.close() + async def test_is_paused(self): + queue = Queue(queueName) + await queue.pause() + isPaused = await queue.isPaused() + + self.assertEqual(isPaused, True) + + await queue.resume() + + isPaused = await queue.isPaused() + + self.assertEqual(isPaused, False) + + await queue.close() + + async def test_is_paused_with_custom_prefix(self): + queue = Queue(queueName, {}, {"prefix": "test"}) + await queue.pause() + isPaused = await queue.isPaused() + + self.assertEqual(isPaused, True) + + await queue.resume() + + isPaused = await queue.isPaused() + + self.assertEqual(isPaused, False) + + await queue.close() + async def test_trim_events_manually(self): queue = Queue(queueName) await queue.add("test", data={}, opts={}) diff --git a/src/commands/includes/moveJobFromPriorityToActive.lua b/src/commands/includes/moveJobFromPriorityToActive.lua index fd398f0fa0..85ffb036d7 100644 --- a/src/commands/includes/moveJobFromPriorityToActive.lua +++ b/src/commands/includes/moveJobFromPriorityToActive.lua @@ -11,4 +11,3 @@ local function moveJobFromPriorityToActive(priorityKey, activeKey, priorityCount rcall("DEL", priorityCounterKey) end end - \ No newline at end of file diff --git a/tests/test_repeat.ts b/tests/test_repeat.ts index 1ceb53e4d6..88367a80fe 100644 --- a/tests/test_repeat.ts +++ b/tests/test_repeat.ts @@ -1010,6 +1010,7 @@ describe('repeat', function () { resolve(); } } catch (error) { + console.log(error); reject(error); } });