@pikku/queue-bullmq 0.11.0 → 0.11.1

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,11 +1,24 @@
1
1
  ## 0.11.0
2
2
 
3
+ ## 0.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 4b811db: chore: updating all dependencies
8
+ - 06e1a31: breaking: change session services to wire services
9
+ - Updated dependencies [4b811db]
10
+ - Updated dependencies [e12a00c]
11
+ - Updated dependencies [4579434]
12
+ - Updated dependencies [28aeb7f]
13
+ - Updated dependencies [ce902b1]
14
+ - Updated dependencies [06e1a31]
15
+ - @pikku/core@0.11.1
16
+
3
17
  ### Minor Changes
4
18
 
5
19
  - Add scheduler service implementation
6
20
  - Add service factory for queue and scheduler creation
7
21
 
8
-
9
22
  # @pikku/queue-bullmq
10
23
 
11
24
  ## 0.10.0
@@ -1,6 +1,6 @@
1
1
  import { ConnectionOptions, WorkerOptions } from 'bullmq';
2
2
  import type { QueueWorkers, PikkuWorkerConfig, QueueConfigMapping, ConfigValidationResult } from '@pikku/core/queue';
3
- import type { CoreServices, CoreSingletonServices, CreateSessionServices } from '@pikku/core';
3
+ import type { CoreServices, CoreSingletonServices, CreateWireServices } from '@pikku/core';
4
4
  export declare const mapPikkuWorkerToBull: (workerConfig?: PikkuWorkerConfig) => Omit<WorkerOptions, "connection">;
5
5
  /**
6
6
  * Bull/Redis queue service implementation
@@ -9,7 +9,7 @@ export declare const mapPikkuWorkerToBull: (workerConfig?: PikkuWorkerConfig) =>
9
9
  export declare class BullQueueWorkers implements QueueWorkers {
10
10
  private redisConnectionOptions;
11
11
  private singletonServices;
12
- private createSessionServices?;
12
+ private createWireServices?;
13
13
  readonly name = "bull";
14
14
  readonly supportsResults = true;
15
15
  /**
@@ -19,7 +19,7 @@ export declare class BullQueueWorkers implements QueueWorkers {
19
19
  readonly configMappings: QueueConfigMapping;
20
20
  private workers;
21
21
  private queueEvents;
22
- constructor(redisConnectionOptions: ConnectionOptions, singletonServices: CoreSingletonServices, createSessionServices?: CreateSessionServices<CoreSingletonServices, CoreServices, any> | undefined);
22
+ constructor(redisConnectionOptions: ConnectionOptions, singletonServices: CoreSingletonServices, createWireServices?: CreateWireServices<CoreSingletonServices, CoreServices, any> | undefined);
23
23
  /**
24
24
  * Scan state and register all compatible processors
25
25
  */
@@ -38,7 +38,7 @@ export const mapPikkuWorkerToBull = (workerConfig) => {
38
38
  export class BullQueueWorkers {
39
39
  redisConnectionOptions;
40
40
  singletonServices;
41
- createSessionServices;
41
+ createWireServices;
42
42
  name = 'bull';
43
43
  supportsResults = true;
44
44
  /**
@@ -101,10 +101,10 @@ export class BullQueueWorkers {
101
101
  };
102
102
  workers = new Map();
103
103
  queueEvents = new Map();
104
- constructor(redisConnectionOptions, singletonServices, createSessionServices) {
104
+ constructor(redisConnectionOptions, singletonServices, createWireServices) {
105
105
  this.redisConnectionOptions = redisConnectionOptions;
106
106
  this.singletonServices = singletonServices;
107
- this.createSessionServices = createSessionServices;
107
+ this.createWireServices = createWireServices;
108
108
  }
109
109
  /**
110
110
  * Scan state and register all compatible processors
@@ -115,7 +115,7 @@ export class BullQueueWorkers {
115
115
  try {
116
116
  return await runQueueJob({
117
117
  singletonServices: this.singletonServices,
118
- createSessionServices: this.createSessionServices,
118
+ createWireServices: this.createWireServices,
119
119
  job: await mapBullJobToQueueJob(job, this.redisConnectionOptions, this.queueEvents),
120
120
  updateProgress: async (progress) => {
121
121
  await job.updateProgress(progress);
@@ -2,7 +2,7 @@ import { ConnectionOptions } from 'bullmq';
2
2
  import { BullQueueService } from './bull-queue-service.js';
3
3
  import { BullQueueWorkers } from './bull-queue-worker.js';
4
4
  import { BullSchedulerService } from './bull-scheduler-service.js';
5
- import type { CoreServices, CoreSingletonServices, CreateSessionServices } from '@pikku/core';
5
+ import type { CoreServices, CoreSingletonServices, CreateWireServices } from '@pikku/core';
6
6
  /**
7
7
  * Factory class for BullMQ services
8
8
  * Manages Redis connection options shared across queue, worker, and scheduler services
@@ -24,7 +24,7 @@ export declare class BullServiceFactory {
24
24
  /**
25
25
  * Get the queue workers for processing jobs
26
26
  */
27
- getQueueWorkers(singletonServices: CoreSingletonServices, createSessionServices?: CreateSessionServices<CoreSingletonServices, CoreServices, any>): BullQueueWorkers;
27
+ getQueueWorkers(singletonServices: CoreSingletonServices, createWireServices?: CreateWireServices<CoreSingletonServices, CoreServices, any>): BullQueueWorkers;
28
28
  /**
29
29
  * Get the scheduler service for managing delayed tasks
30
30
  */
@@ -31,9 +31,9 @@ export class BullServiceFactory {
31
31
  /**
32
32
  * Get the queue workers for processing jobs
33
33
  */
34
- getQueueWorkers(singletonServices, createSessionServices) {
34
+ getQueueWorkers(singletonServices, createWireServices) {
35
35
  if (!this.queueWorkers) {
36
- this.queueWorkers = new BullQueueWorkers(this.redisConnectionOptions, singletonServices, createSessionServices);
36
+ this.queueWorkers = new BullQueueWorkers(this.redisConnectionOptions, singletonServices, createWireServices);
37
37
  }
38
38
  return this.queueWorkers;
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/queue-bullmq",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -13,10 +13,10 @@
13
13
  "release": "npm run build && npm test"
14
14
  },
15
15
  "peerDependencies": {
16
- "@pikku/core": "^0.11.0"
16
+ "@pikku/core": "^0.11.1"
17
17
  },
18
18
  "dependencies": {
19
- "bullmq": "^5.61.0",
19
+ "bullmq": "^5.63.2",
20
20
  "ioredis": "^5.8.2"
21
21
  },
22
22
  "devDependencies": {
@@ -19,7 +19,7 @@ import {
19
19
  import type {
20
20
  CoreServices,
21
21
  CoreSingletonServices,
22
- CreateSessionServices,
22
+ CreateWireServices,
23
23
  } from '@pikku/core'
24
24
  import { mapBullJobToQueueJob } from './utils.js'
25
25
 
@@ -145,7 +145,7 @@ export class BullQueueWorkers implements QueueWorkers {
145
145
  constructor(
146
146
  private redisConnectionOptions: ConnectionOptions,
147
147
  private singletonServices: CoreSingletonServices,
148
- private createSessionServices?: CreateSessionServices<
148
+ private createWireServices?: CreateWireServices<
149
149
  CoreSingletonServices,
150
150
  CoreServices,
151
151
  any
@@ -166,7 +166,7 @@ export class BullQueueWorkers implements QueueWorkers {
166
166
  try {
167
167
  return await runQueueJob({
168
168
  singletonServices: this.singletonServices,
169
- createSessionServices: this.createSessionServices,
169
+ createWireServices: this.createWireServices,
170
170
  job: await mapBullJobToQueueJob(
171
171
  job,
172
172
  this.redisConnectionOptions,
@@ -5,7 +5,7 @@ import { BullSchedulerService } from './bull-scheduler-service.js'
5
5
  import type {
6
6
  CoreServices,
7
7
  CoreSingletonServices,
8
- CreateSessionServices,
8
+ CreateWireServices,
9
9
  } from '@pikku/core'
10
10
 
11
11
  /**
@@ -41,7 +41,7 @@ export class BullServiceFactory {
41
41
  */
42
42
  getQueueWorkers(
43
43
  singletonServices: CoreSingletonServices,
44
- createSessionServices?: CreateSessionServices<
44
+ createWireServices?: CreateWireServices<
45
45
  CoreSingletonServices,
46
46
  CoreServices,
47
47
  any
@@ -51,7 +51,7 @@ export class BullServiceFactory {
51
51
  this.queueWorkers = new BullQueueWorkers(
52
52
  this.redisConnectionOptions,
53
53
  singletonServices,
54
- createSessionServices
54
+ createWireServices
55
55
  )
56
56
  }
57
57
  return this.queueWorkers