@checkstack/queue-bullmq-backend 0.1.0 → 0.1.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @checkstack/queue-bullmq-backend
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [180be38]
8
+ - Updated dependencies [7a23261]
9
+ - @checkstack/queue-api@0.1.0
10
+ - @checkstack/common@0.3.0
11
+ - @checkstack/backend-api@0.3.2
12
+ - @checkstack/queue-bullmq-common@0.1.1
13
+
14
+ ## 0.1.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 9a27800: Fix recurring jobs resilience and add logger support
19
+
20
+ **Rescheduling Fix:**
21
+ Previously, recurring job rescheduling logic was inside the `try` block of `processJob()`. When a job handler threw an exception and `maxRetries` was exhausted (or 0), the recurring job would never be rescheduled, permanently breaking the scheduling chain.
22
+
23
+ This fix moves the rescheduling logic to the `finally` block, ensuring recurring jobs are always rescheduled after execution, regardless of success or failure.
24
+
25
+ **Heartbeat Mechanism:**
26
+ Added a periodic heartbeat (default: 5 seconds) that checks for ready jobs and triggers processing. This ensures jobs are processed even if `setTimeout` callbacks fail to fire (e.g., after system sleep/wake cycles). Configurable via `heartbeatIntervalMs` option; set to 0 to disable.
27
+
28
+ **Logger Service Integration:**
29
+
30
+ - Added optional `logger` parameter to `QueuePlugin.createQueue()` interface
31
+ - `InMemoryQueue` now uses the provided logger instead of raw `console.error`
32
+ - Consistent with the rest of the codebase's logging patterns
33
+
34
+ - Updated dependencies [9a27800]
35
+ - @checkstack/queue-api@0.0.6
36
+ - @checkstack/backend-api@0.3.1
37
+
3
38
  ## 0.1.0
4
39
 
5
40
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/queue-bullmq-backend",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
package/src/plugin.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { QueuePlugin, Queue } from "@checkstack/queue-api";
2
- import { configString, configNumber } from "@checkstack/backend-api";
2
+ import {
3
+ configString,
4
+ configNumber,
5
+ type Logger,
6
+ } from "@checkstack/backend-api";
3
7
  import { z } from "zod";
4
8
  import { BullMQQueue } from "./bullmq-queue";
5
9
 
@@ -30,7 +34,12 @@ export class BullMQPlugin implements QueuePlugin<BullMQConfig> {
30
34
  configVersion = 1;
31
35
  configSchema = configSchema;
32
36
 
33
- createQueue<T>(name: string, config: BullMQConfig): Queue<T> {
37
+ createQueue<T>(
38
+ name: string,
39
+ config: BullMQConfig,
40
+ _logger: Logger
41
+ ): Queue<T> {
42
+ // Note: BullMQ has its own logging via Redis events
34
43
  return new BullMQQueue<T>(name, config);
35
44
  }
36
45
  }