@nest-boot/bullmq 7.0.0-beta.3 → 7.0.0-beta.4
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,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare function Processor
|
|
1
|
+
import { ProcessorOptions } from "@nestjs/bullmq";
|
|
2
|
+
import { NestWorkerOptions } from "@nestjs/bullmq/dist/interfaces/worker-options.interface";
|
|
3
|
+
export declare function Processor(queueName: string): ClassDecorator;
|
|
4
|
+
export declare function Processor(queueName: string, workerOptions: NestWorkerOptions): ClassDecorator;
|
|
5
|
+
export declare function Processor(processorOptions: ProcessorOptions): ClassDecorator;
|
|
6
|
+
export declare function Processor(processorOptions: ProcessorOptions, workerOptions: NestWorkerOptions): ClassDecorator;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.Processor = Processor;
|
|
4
5
|
const request_context_1 = require("@nest-boot/request-context");
|
|
5
6
|
const bullmq_1 = require("@nestjs/bullmq");
|
|
6
|
-
function Processor(
|
|
7
|
+
function Processor(queueNameOrOptions, maybeWorkerOptions) {
|
|
7
8
|
return (target) => {
|
|
8
9
|
const originalProcess = target.prototype.process;
|
|
9
10
|
if (originalProcess) {
|
|
@@ -16,7 +17,7 @@ function Processor(...args) {
|
|
|
16
17
|
return await request_context_1.RequestContext.run(ctx, () => originalProcess.call(this, job));
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
|
-
(0, bullmq_1.Processor)(
|
|
20
|
+
(0, bullmq_1.Processor)(queueNameOrOptions, maybeWorkerOptions)(target);
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
//# sourceMappingURL=processor.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processor.decorator.js","sourceRoot":"","sources":["../src/processor.decorator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"processor.decorator.js","sourceRoot":"","sources":["../src/processor.decorator.ts"],"names":[],"mappings":";AAAA,0DAA0D;;AA2B1D,8BAuBC;AAhDD,gEAA4D;AAC5D,2CAKwB;AAmBxB,SAAgB,SAAS,CACvB,kBAA8C,EAC9C,kBAAsC;IAEtC,OAAO,CAAC,MAA2B,EAAE,EAAE;QACrC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC;QACjD,IAAI,eAAe,EAAE,CAAC;YACpB,MAAM,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK,WAAW,GAAQ;gBACjD,MAAM,GAAG,GAAG,IAAI,gCAAc,CAAC;oBAC7B,EAAE,EAAE,GAAG,CAAC,EAAE;oBACV,IAAI,EAAE,OAAO;iBACd,CAAC,CAAC;gBAEH,GAAG,CAAC,GAAG,CAAC,gBAAO,EAAE,GAAG,CAAC,CAAC;gBAEtB,OAAO,MAAM,gCAAc,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CACxC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAChC,CAAC;YACJ,CAAC,CAAC;QACJ,CAAC;QAED,IAAA,kBAAa,EAAC,kBAAyB,EAAE,kBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;IAC9E,CAAC,CAAC;AACJ,CAAC"}
|