vona-module-a-queue 5.0.28 → 5.0.29
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.js +3 -3
- package/dist/types/queue.d.ts +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66,12 +66,11 @@ let ServiceQueue = (_dec$2 = Service(), _dec2$2 = BeanInfo({
|
|
|
66
66
|
// queueConfig.options: queue/worker/job/redlock
|
|
67
67
|
const workerOptions = queueConfig?.options?.worker;
|
|
68
68
|
const redlockOptions = queueConfig?.options?.redlock;
|
|
69
|
-
const
|
|
70
|
-
const _lockTTL = redlockOptions?.lockTTL ?? this.$scope.redlock.config.redlock.lockTTL;
|
|
69
|
+
const _lockTTL = redlockOptions?.lockTTL ?? this.$scope.redlock.config.lockTTL;
|
|
71
70
|
|
|
72
71
|
// redlock
|
|
73
72
|
if (!queueConfig?.concurrency) {
|
|
74
|
-
_worker.redlock = this.$scope.redlock.service.redlock.create(
|
|
73
|
+
_worker.redlock = this.$scope.redlock.service.redlock.create(redlockOptions);
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
// create work
|
|
@@ -266,6 +265,7 @@ let ServiceQueue = (_dec$2 = Service(), _dec2$2 = BeanInfo({
|
|
|
266
265
|
}, {
|
|
267
266
|
dbInfo: info.options?.dbInfo,
|
|
268
267
|
locale: info.options?.locale,
|
|
268
|
+
tz: info.options?.tz,
|
|
269
269
|
instanceName: info.options?.instanceName,
|
|
270
270
|
extraData: info.options?.extraData,
|
|
271
271
|
transaction: queueConfig?.transaction
|
package/dist/types/queue.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type Redlock from '@sesamecare-oss/redlock';
|
|
2
2
|
import type * as Bull from 'bullmq';
|
|
3
|
-
import type { OmitNever } from 'vona';
|
|
3
|
+
import type { OmitNever, PowerPartial } from 'vona';
|
|
4
4
|
import type { IGeneralInfoOptions } from 'vona-module-a-executor';
|
|
5
5
|
import type { ServiceOnion, TypeOnionOptionsEnableSimple } from 'vona-module-a-onion';
|
|
6
|
+
import type { IRedlockClientOptions } from 'vona-module-a-redlock';
|
|
6
7
|
export interface IQueuePushOptions extends IGeneralInfoOptions {
|
|
7
8
|
queueNameSub?: string;
|
|
8
9
|
jobName?: string;
|
|
@@ -51,7 +52,7 @@ export interface IDecoratorQueueOptions extends TypeOnionOptionsEnableSimple {
|
|
|
51
52
|
options?: {
|
|
52
53
|
queue?: Partial<Bull.QueueOptions>;
|
|
53
54
|
worker?: Partial<Bull.WorkerOptions>;
|
|
54
|
-
redlock?:
|
|
55
|
+
redlock?: PowerPartial<IRedlockClientOptions> & {
|
|
55
56
|
lockTTL?: number;
|
|
56
57
|
};
|
|
57
58
|
job?: Bull.JobsOptions;
|