@zintrust/queue-monitor 0.4.34 → 0.4.36
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/build-manifest.json +13 -13
- package/dist/driver.js +2 -2
- package/dist/index.js +3 -3
- package/dist/metrics.js +1 -1
- package/dist/worker.js +1 -1
- package/package.json +4 -4
package/dist/build-manifest.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zintrust/queue-monitor",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"buildDate": "2026-03-
|
|
3
|
+
"version": "0.4.36",
|
|
4
|
+
"buildDate": "2026-03-30T17:19:45.415Z",
|
|
5
5
|
"buildEnvironment": {
|
|
6
6
|
"node": "v22.22.1",
|
|
7
7
|
"platform": "darwin",
|
|
8
8
|
"arch": "arm64"
|
|
9
9
|
},
|
|
10
10
|
"git": {
|
|
11
|
-
"commit": "
|
|
12
|
-
"branch": "
|
|
11
|
+
"commit": "a45b4628",
|
|
12
|
+
"branch": "release"
|
|
13
13
|
},
|
|
14
14
|
"package": {
|
|
15
15
|
"engines": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"build-manifest.json": {
|
|
44
44
|
"size": 3862,
|
|
45
|
-
"sha256": "
|
|
45
|
+
"sha256": "7c6560e9331836b3c413c3c76415e01702dd0d8d760ce4c1124c6b2d058b99bd"
|
|
46
46
|
},
|
|
47
47
|
"config/queueMonitor.d.ts": {
|
|
48
48
|
"size": 407,
|
|
@@ -81,24 +81,24 @@
|
|
|
81
81
|
"sha256": "b672414002f819d195cd97d7eb35fee1c09324e33e713e443f524323f65bea28"
|
|
82
82
|
},
|
|
83
83
|
"driver.js": {
|
|
84
|
-
"size":
|
|
85
|
-
"sha256": "
|
|
84
|
+
"size": 4105,
|
|
85
|
+
"sha256": "50229d05df9ca8bf5528b923e2799a4719e5a32ad9fa30bf3e2f36ecc91cf00c"
|
|
86
86
|
},
|
|
87
87
|
"index.d.ts": {
|
|
88
88
|
"size": 1965,
|
|
89
89
|
"sha256": "be25d5e56f1c0ce0387c67ef7ce7544074e0d90698ad93826bb4d557d1a0b26f"
|
|
90
90
|
},
|
|
91
91
|
"index.js": {
|
|
92
|
-
"size":
|
|
93
|
-
"sha256": "
|
|
92
|
+
"size": 11889,
|
|
93
|
+
"sha256": "eabcbc792247cdc7462b4462b0af45fa35324421b39f78a5781db368088d8c66"
|
|
94
94
|
},
|
|
95
95
|
"metrics.d.ts": {
|
|
96
96
|
"size": 848,
|
|
97
97
|
"sha256": "3ed092d97ff3ce81b43aa85dbded2898479d5c4d46860f22f21415085dce6229"
|
|
98
98
|
},
|
|
99
99
|
"metrics.js": {
|
|
100
|
-
"size":
|
|
101
|
-
"sha256": "
|
|
100
|
+
"size": 3448,
|
|
101
|
+
"sha256": "022c97865d37933fd7ed92f47b86b0450056caffd629fce6add51c902529bfe5"
|
|
102
102
|
},
|
|
103
103
|
"routes/workers.d.ts": {
|
|
104
104
|
"size": 477,
|
|
@@ -113,8 +113,8 @@
|
|
|
113
113
|
"sha256": "97cddbc991c6e6724950090cd92f06671932ab848c16dd94a030d9fba3fbae26"
|
|
114
114
|
},
|
|
115
115
|
"worker.js": {
|
|
116
|
-
"size":
|
|
117
|
-
"sha256": "
|
|
116
|
+
"size": 1233,
|
|
117
|
+
"sha256": "da26c1b80da7473e1644a4e0f8d814097ce0adff14e36037164f9ae5855e656a"
|
|
118
118
|
},
|
|
119
119
|
"workers-ui.d.ts": {
|
|
120
120
|
"size": 214,
|
package/dist/driver.js
CHANGED
|
@@ -43,11 +43,11 @@ async function discoverQueuesFromRedis(redis, inMemoryQueues) {
|
|
|
43
43
|
}
|
|
44
44
|
export const createBullMQDriver = (config) => {
|
|
45
45
|
const queues = new Map();
|
|
46
|
-
const redis = createRedisConnection(config);
|
|
46
|
+
const redis = createRedisConnection(config, 3, { subsystem: 'queue-monitor' });
|
|
47
47
|
const getQueue = (name) => {
|
|
48
48
|
if (!queues.has(name)) {
|
|
49
49
|
const prefix = getBullMQSafeQueueName();
|
|
50
|
-
const connection = createRedisConnection(config);
|
|
50
|
+
const connection = createRedisConnection(config, 3, { subsystem: 'queue-monitor' });
|
|
51
51
|
const queue = new Queue(name, { prefix, connection: connection });
|
|
52
52
|
queues.set(name, queue);
|
|
53
53
|
}
|
package/dist/index.js
CHANGED
|
@@ -14,9 +14,9 @@ const DEFAULTS = {
|
|
|
14
14
|
};
|
|
15
15
|
function extractQueueParam(req) {
|
|
16
16
|
if (typeof req.getParam === 'function') {
|
|
17
|
-
return
|
|
17
|
+
return req.getParam('queue') || (req?.params === undefined ? undefined : req?.params['queue']);
|
|
18
18
|
}
|
|
19
|
-
return req
|
|
19
|
+
return req?.params === undefined ? undefined : req?.params['queue'];
|
|
20
20
|
}
|
|
21
21
|
function fieldError(key, message) {
|
|
22
22
|
return { error: `[${key}] ${message}` };
|
|
@@ -109,7 +109,7 @@ const buildLockHistogram = (locks) => {
|
|
|
109
109
|
};
|
|
110
110
|
function createGetLocks(redisConfig) {
|
|
111
111
|
return async (pattern = '*') => {
|
|
112
|
-
const client = createRedisConnection(redisConfig);
|
|
112
|
+
const client = createRedisConnection(redisConfig, 3, { subsystem: 'queue-monitor-locks' });
|
|
113
113
|
const prefix_lock = resolveLockPrefix();
|
|
114
114
|
const searchPattern = `${prefix_lock}${pattern}`;
|
|
115
115
|
try {
|
package/dist/metrics.js
CHANGED
|
@@ -68,7 +68,7 @@ const getStatsImpl = async (redis, queue, minutes) => {
|
|
|
68
68
|
.reverse();
|
|
69
69
|
};
|
|
70
70
|
export const createMetrics = (config) => {
|
|
71
|
-
const redis = createRedisConnection(config);
|
|
71
|
+
const redis = createRedisConnection(config, 3, { subsystem: 'queue-monitor-metrics' });
|
|
72
72
|
return Object.freeze({
|
|
73
73
|
recordJob: (queue, status, job, error) => recordJobImpl(redis, queue, status, job, error),
|
|
74
74
|
getStats: (queue, minutes = 60) => getStatsImpl(redis, queue, minutes),
|
package/dist/worker.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getBullMQSafeQueueName } from '@zintrust/core';
|
|
|
2
2
|
import { Worker } from 'bullmq';
|
|
3
3
|
import { createRedisConnection } from './connection';
|
|
4
4
|
export const createWorker = (queueName, processor, redisConfig, metrics) => {
|
|
5
|
-
const connection = createRedisConnection(redisConfig);
|
|
5
|
+
const connection = createRedisConnection(redisConfig, 3, { subsystem: 'queue-monitor-worker' });
|
|
6
6
|
const prefix = getBullMQSafeQueueName();
|
|
7
7
|
const worker = new Worker(queueName, processor, {
|
|
8
8
|
connection: connection,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zintrust/queue-monitor",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.36",
|
|
4
4
|
"description": "Queue monitoring package for ZinTrust with BullMQ and Redis.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"node": ">=20.0.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@zintrust/core": "^0.4.
|
|
23
|
+
"@zintrust/core": "^0.4.36"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"prepublishOnly": "npm run build"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"bullmq": "^5.71.
|
|
41
|
-
"ioredis": "^5.10.
|
|
40
|
+
"bullmq": "^5.71.1",
|
|
41
|
+
"ioredis": "^5.10.1"
|
|
42
42
|
}
|
|
43
43
|
}
|