nestjs-power-queues 1.0.30 → 1.0.32
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/dist/index.cjs +11 -4
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -51,12 +51,19 @@ var _QueueService = class _QueueService extends import_power_queues.PowerQueues
|
|
|
51
51
|
queueName() {
|
|
52
52
|
return process.env.QUEUE_NAME || String(process.argv[3]);
|
|
53
53
|
}
|
|
54
|
-
async
|
|
55
|
-
await this.
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
async init() {
|
|
55
|
+
if (await this.redisService.checkConnection()) {
|
|
56
|
+
await this.loadScripts(this.runOnInit);
|
|
57
|
+
if (this.runOnInit) {
|
|
58
|
+
await this.runQueue(this.queueName());
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
setTimeout(this.init, 5e3);
|
|
58
62
|
}
|
|
59
63
|
}
|
|
64
|
+
async onModuleInit() {
|
|
65
|
+
void this.init();
|
|
66
|
+
}
|
|
60
67
|
async onModuleDestroy() {
|
|
61
68
|
if (this.runOnInit) {
|
|
62
69
|
this.abort.abort();
|
package/dist/index.d.cts
CHANGED
|
@@ -15,6 +15,7 @@ declare class QueueService extends PowerQueues implements OnModuleInit, OnModule
|
|
|
15
15
|
redis: IORedisLike;
|
|
16
16
|
constructor(redisService: RedisService);
|
|
17
17
|
queueName(): string;
|
|
18
|
+
init(): Promise<void>;
|
|
18
19
|
onModuleInit(): Promise<void>;
|
|
19
20
|
onModuleDestroy(): Promise<void>;
|
|
20
21
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare class QueueService extends PowerQueues implements OnModuleInit, OnModule
|
|
|
15
15
|
redis: IORedisLike;
|
|
16
16
|
constructor(redisService: RedisService);
|
|
17
17
|
queueName(): string;
|
|
18
|
+
init(): Promise<void>;
|
|
18
19
|
onModuleInit(): Promise<void>;
|
|
19
20
|
onModuleDestroy(): Promise<void>;
|
|
20
21
|
}
|
package/dist/index.js
CHANGED
|
@@ -25,12 +25,19 @@ var _QueueService = class _QueueService extends PowerQueues {
|
|
|
25
25
|
queueName() {
|
|
26
26
|
return process.env.QUEUE_NAME || String(process.argv[3]);
|
|
27
27
|
}
|
|
28
|
-
async
|
|
29
|
-
await this.
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
async init() {
|
|
29
|
+
if (await this.redisService.checkConnection()) {
|
|
30
|
+
await this.loadScripts(this.runOnInit);
|
|
31
|
+
if (this.runOnInit) {
|
|
32
|
+
await this.runQueue(this.queueName());
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
setTimeout(this.init, 5e3);
|
|
32
36
|
}
|
|
33
37
|
}
|
|
38
|
+
async onModuleInit() {
|
|
39
|
+
void this.init();
|
|
40
|
+
}
|
|
34
41
|
async onModuleDestroy() {
|
|
35
42
|
if (this.runOnInit) {
|
|
36
43
|
this.abort.abort();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nestjs-power-queues",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "High-performance Redis Streams queue integration for NestJS based on power-queues.",
|
|
5
5
|
"author": "ihor-bielchenko",
|
|
6
6
|
"license": "MIT",
|
|
@@ -88,6 +88,6 @@
|
|
|
88
88
|
"@nestjs-labs/nestjs-ioredis": "^11.0.4",
|
|
89
89
|
"@nestjs/common": "^11.1.8",
|
|
90
90
|
"nestjs-power-redis": "^1.0.17",
|
|
91
|
-
"power-queues": "^2.1.
|
|
91
|
+
"power-queues": "^2.1.14"
|
|
92
92
|
}
|
|
93
93
|
}
|