@anchan828/nest-cloud-run-queue-worker 3.1.11 → 3.1.13
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.
|
@@ -55,18 +55,18 @@ let QueueWorkerExplorerService = class QueueWorkerExplorerService {
|
|
|
55
55
|
const instance = worker.instance;
|
|
56
56
|
const prototype = Object.getPrototypeOf(instance);
|
|
57
57
|
for (const methodName of this.metadataScanner.getAllMethodNames(prototype)) {
|
|
58
|
-
const
|
|
59
|
-
if (!
|
|
58
|
+
const methodRef = instance[methodName];
|
|
59
|
+
if (!methodRef) {
|
|
60
60
|
continue;
|
|
61
61
|
}
|
|
62
|
-
const args = Reflect.getMetadata(constants_1.QUEUE_WORKER_PROCESS_DECORATOR,
|
|
62
|
+
const args = Reflect.getMetadata(constants_1.QUEUE_WORKER_PROCESS_DECORATOR, methodRef);
|
|
63
63
|
if (args) {
|
|
64
64
|
if (args.enabled === false) {
|
|
65
65
|
continue;
|
|
66
66
|
}
|
|
67
67
|
metadata.push({
|
|
68
68
|
priority: args.priority || 0,
|
|
69
|
-
processor,
|
|
69
|
+
processor: methodRef.bind(instance),
|
|
70
70
|
processorName: `${worker.className}.${methodName}`,
|
|
71
71
|
workerName: worker.name,
|
|
72
72
|
});
|
|
@@ -44,7 +44,7 @@ let QueueWorkerService = class QueueWorkerService {
|
|
|
44
44
|
if (this.options.throwModuleError && !decodedMessage.data.name) {
|
|
45
45
|
throw new common_1.BadRequestException(constants_1.ERROR_QUEUE_WORKER_NAME_NOT_FOUND);
|
|
46
46
|
}
|
|
47
|
-
const workers =
|
|
47
|
+
const workers = this.getWorkers(decodedMessage);
|
|
48
48
|
if (this.options.throwModuleError && workers.length === 0) {
|
|
49
49
|
throw new common_1.BadRequestException((0, constants_1.ERROR_WORKER_NOT_FOUND)(decodedMessage.data.name));
|
|
50
50
|
}
|
|
@@ -52,18 +52,18 @@ let QueueWorkerExplorerService = class QueueWorkerExplorerService {
|
|
|
52
52
|
const instance = worker.instance;
|
|
53
53
|
const prototype = Object.getPrototypeOf(instance);
|
|
54
54
|
for (const methodName of this.metadataScanner.getAllMethodNames(prototype)) {
|
|
55
|
-
const
|
|
56
|
-
if (!
|
|
55
|
+
const methodRef = instance[methodName];
|
|
56
|
+
if (!methodRef) {
|
|
57
57
|
continue;
|
|
58
58
|
}
|
|
59
|
-
const args = Reflect.getMetadata(QUEUE_WORKER_PROCESS_DECORATOR,
|
|
59
|
+
const args = Reflect.getMetadata(QUEUE_WORKER_PROCESS_DECORATOR, methodRef);
|
|
60
60
|
if (args) {
|
|
61
61
|
if (args.enabled === false) {
|
|
62
62
|
continue;
|
|
63
63
|
}
|
|
64
64
|
metadata.push({
|
|
65
65
|
priority: args.priority || 0,
|
|
66
|
-
processor,
|
|
66
|
+
processor: methodRef.bind(instance),
|
|
67
67
|
processorName: `${worker.className}.${methodName}`,
|
|
68
68
|
workerName: worker.name,
|
|
69
69
|
});
|
|
@@ -41,7 +41,7 @@ let QueueWorkerService = class QueueWorkerService {
|
|
|
41
41
|
if (this.options.throwModuleError && !decodedMessage.data.name) {
|
|
42
42
|
throw new BadRequestException(ERROR_QUEUE_WORKER_NAME_NOT_FOUND);
|
|
43
43
|
}
|
|
44
|
-
const workers =
|
|
44
|
+
const workers = this.getWorkers(decodedMessage);
|
|
45
45
|
if (this.options.throwModuleError && workers.length === 0) {
|
|
46
46
|
throw new BadRequestException(ERROR_WORKER_NOT_FOUND(decodedMessage.data.name));
|
|
47
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anchan828/nest-cloud-run-queue-worker",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.13",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "https://github.com/anchan828/nest-cloud-run-queue/tree/master/packages/worker#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"watch": "tsc -w"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@anchan828/nest-cloud-run-queue-common": "^3.1.
|
|
36
|
+
"@anchan828/nest-cloud-run-queue-common": "^3.1.13"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@nestjs/common": "10.4.1",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"packageManager": "npm@10.8.
|
|
48
|
+
"packageManager": "npm@10.8.3",
|
|
49
49
|
"exports": {
|
|
50
50
|
".": {
|
|
51
51
|
"import": {
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"default": "./dist/cjs/index.js"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "c83de563dd7829e76c45bb27aac614619adbe142"
|
|
64
64
|
}
|