@midwayjs/bull 3.9.2 → 3.10.0

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.
@@ -4,5 +4,6 @@ export declare class BullConfiguration {
4
4
  framework: BullFramework;
5
5
  decoratorService: MidwayDecoratorService;
6
6
  init(): Promise<void>;
7
+ onReady(): Promise<void>;
7
8
  }
8
9
  //# sourceMappingURL=configuration.d.ts.map
@@ -20,6 +20,9 @@ let BullConfiguration = class BullConfiguration {
20
20
  return this.framework.getQueue(meta.queueName);
21
21
  });
22
22
  }
23
+ async onReady() {
24
+ this.framework.loadConfig();
25
+ }
23
26
  };
24
27
  __decorate([
25
28
  (0, core_1.Inject)(),
@@ -13,6 +13,7 @@ export declare class BullFramework extends BaseFramework<Application, Context, a
13
13
  private bullClearRepeatJobWhenStart;
14
14
  private queueMap;
15
15
  applicationInitialize(options: IMidwayBootstrapOptions): Promise<void>;
16
+ loadConfig(): void;
16
17
  configure(): any;
17
18
  getFrameworkName(): string;
18
19
  run(): Promise<void>;
package/dist/framework.js CHANGED
@@ -29,6 +29,8 @@ let BullFramework = class BullFramework extends core_1.BaseFramework {
29
29
  }
30
30
  async applicationInitialize(options) {
31
31
  this.app = {};
32
+ }
33
+ loadConfig() {
32
34
  this.bullDefaultQueueConfig = this.configService.getConfiguration('bull.defaultQueueOptions');
33
35
  this.bullDefaultConcurrency = this.configService.getConfiguration('bull.defaultConcurrency');
34
36
  this.bullClearRepeatJobWhenStart = this.configService.getConfiguration('bull.clearRepeatJobWhenStart');
@@ -16,7 +16,7 @@ export interface IQueueManager<Queue extends IQueue<Job>, Job> {
16
16
  }
17
17
  export interface Application extends IMidwayApplication<Context> {
18
18
  }
19
- export declare type NextFunction = BaseNextFunction;
19
+ export type NextFunction = BaseNextFunction;
20
20
  export interface Context extends IMidwayContext {
21
21
  jobId: JobId;
22
22
  job: Job;
package/index.d.ts CHANGED
@@ -9,6 +9,7 @@ declare module '@midwayjs/core/dist/interface' {
9
9
  defaultQueueOptions?: bull.QueueOptions;
10
10
  defaultConcurrency?: number;
11
11
  clearRepeatJobWhenStart?: boolean;
12
+ contextLoggerFormat?: (info: any) => string;
12
13
  };
13
14
  }
14
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/bull",
3
- "version": "3.9.2",
3
+ "version": "3.10.0",
4
4
  "description": "midway component for bull",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -24,14 +24,14 @@
24
24
  ],
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@midwayjs/core": "^3.9.0",
28
- "@midwayjs/mock": "^3.9.0"
27
+ "@midwayjs/core": "^3.10.0",
28
+ "@midwayjs/mock": "^3.10.0"
29
29
  },
30
30
  "dependencies": {
31
- "bull": "4.10.1"
31
+ "bull": "4.10.2"
32
32
  },
33
33
  "engines": {
34
34
  "node": ">=12"
35
35
  },
36
- "gitHead": "9d9c3a2ade4602918151fb8ebdafe734d0602e6f"
36
+ "gitHead": "33d28f1a020963404488e866432916fd15c0952c"
37
37
  }