@midwayjs/bull 3.9.0 → 3.9.7

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.
@@ -1,10 +1,10 @@
1
1
  export declare const bull: {
2
2
  defaultQueueOptions: {
3
3
  prefix: string;
4
- };
5
- defaultJobOptions: {
6
- removeOnSuccess: number;
7
- removeOnFail: number;
4
+ defaultJobOptions: {
5
+ removeOnComplete: number;
6
+ removeOnFail: number;
7
+ };
8
8
  };
9
9
  defaultConcurrency: number;
10
10
  clearRepeatJobWhenStart: boolean;
@@ -4,10 +4,10 @@ exports.midwayLogger = exports.bull = void 0;
4
4
  exports.bull = {
5
5
  defaultQueueOptions: {
6
6
  prefix: '{midway-bull}',
7
- },
8
- defaultJobOptions: {
9
- removeOnSuccess: 3,
10
- removeOnFail: 10,
7
+ defaultJobOptions: {
8
+ removeOnComplete: 3,
9
+ removeOnFail: 10,
10
+ },
11
11
  },
12
12
  defaultConcurrency: 1,
13
13
  clearRepeatJobWhenStart: true,
@@ -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');
package/index.d.ts CHANGED
@@ -7,7 +7,6 @@ declare module '@midwayjs/core/dist/interface' {
7
7
  interface MidwayConfig {
8
8
  bull?: {
9
9
  defaultQueueOptions?: bull.QueueOptions;
10
- defaultJobOptions?: bull.JobOptions;
11
10
  defaultConcurrency?: number;
12
11
  clearRepeatJobWhenStart?: boolean;
13
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/bull",
3
- "version": "3.9.0",
3
+ "version": "3.9.7",
4
4
  "description": "midway component for bull",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -33,5 +33,5 @@
33
33
  "engines": {
34
34
  "node": ">=12"
35
35
  },
36
- "gitHead": "5f6603d2c9606fc6fc7ece71f956e89e394efeee"
36
+ "gitHead": "326ba9ce24ce686424aca14f00702e3496a96eb4"
37
37
  }