hirefire-resource 1.1.0 → 1.1.1
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/macro/bullmq.js +9 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/macro/bullmq.js
CHANGED
|
@@ -25,7 +25,11 @@ async function jobQueueLatency(...args) {
|
|
|
25
25
|
* function will use the value of the `REDIS_TLS_URL`, `REDIS_URL`,
|
|
26
26
|
* `REDISTOGO_URL`, `REDISCLOUD_URL`, `OPENREDIS_URL` environment
|
|
27
27
|
* variables, in the order specified. If none of these environment
|
|
28
|
-
* variables are set, it defaults to `redis://localhost:6379/0`.
|
|
28
|
+
* variables are set, it defaults to `redis://localhost:6379/0`. The
|
|
29
|
+
* `options` object can also include a `connectionOptions` property,
|
|
30
|
+
* which is passed as the second argument to the `IORedis` constructor,
|
|
31
|
+
* allowing for further customization of the Redis connection (e.g., TLS
|
|
32
|
+
* options, retry strategies).
|
|
29
33
|
* @returns {Promise<number>} Cumulative job queue size across the specified queues.
|
|
30
34
|
* @example
|
|
31
35
|
* // Calculate size across all queues
|
|
@@ -39,6 +43,9 @@ async function jobQueueLatency(...args) {
|
|
|
39
43
|
* @example
|
|
40
44
|
* // Calculate Size using the options.connection property
|
|
41
45
|
* await jobQueueSize("default", { connection: "redis://localhost:6379/0" })
|
|
46
|
+
* @example
|
|
47
|
+
* // Calculate Size using the options.connectionOptions property
|
|
48
|
+
* await jobQueueSize("default", { connectionOptions: { tls: { rejectUnauthorized: false } } })
|
|
42
49
|
*/
|
|
43
50
|
async function jobQueueSize(...args) {
|
|
44
51
|
let { queues, options } = unpack(args)
|
|
@@ -51,6 +58,7 @@ async function jobQueueSize(...args) {
|
|
|
51
58
|
process.env.REDISCLOUD_URL ||
|
|
52
59
|
process.env.OPENREDIS_URL ||
|
|
53
60
|
"redis://localhost:6379/0",
|
|
61
|
+
options.connectionOptions,
|
|
54
62
|
)
|
|
55
63
|
|
|
56
64
|
if (queues.length === 0) {
|