bullmq 5.80.11 → 5.81.0

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/README.md CHANGED
@@ -186,6 +186,8 @@ $ yarn add bullmq
186
186
 
187
187
  If you use the node-redis adapter (`createNodeRedisClient`), install `redis` v5 or newer (`redis >= 5.0.0`).
188
188
 
189
+ If you use the Valkey Glide adapter (`createValkeyGlideClient`), install `@valkey/valkey-glide`.
190
+
189
191
  Add jobs to the queue:
190
192
 
191
193
  ```ts
@@ -415,7 +415,17 @@ class BunRedisAdapter extends events_1.EventEmitter {
415
415
  // are written contiguously without any other command interleaving.
416
416
  return this.raw.send(command, args).catch((err) => {
417
417
  if (isBunConnectionClosedError(err)) {
418
- return Promise.reject(new connection_closed_error_1.ConnectionClosedError(this.closing || this.closed ? 'Connection is closed' : err.message, err));
418
+ // During an intentional teardown (quit()/disconnect()) resolve to
419
+ // null instead of rejecting. Bun's close() abruptly rejects every
420
+ // in-flight command, so without this a shared client shut down at app
421
+ // exit floods dozens of unhandled ConnectionClosedError rejections.
422
+ // This mirrors the node-redis adapter, which swallows connection-closed
423
+ // errors while destroying. Unexpected drops still reject so BullMQ can
424
+ // react (reconnect / retry).
425
+ if (this.closing || this.closed) {
426
+ return null;
427
+ }
428
+ return Promise.reject(new connection_closed_error_1.ConnectionClosedError(err.message, err));
419
429
  }
420
430
  throw err;
421
431
  });
@@ -11,6 +11,7 @@ tslib_1.__exportStar(require("./flow-producer"), exports);
11
11
  tslib_1.__exportStar(require("./ioredis-client"), exports);
12
12
  tslib_1.__exportStar(require("./node-redis-client"), exports);
13
13
  tslib_1.__exportStar(require("./bun-redis-client"), exports);
14
+ tslib_1.__exportStar(require("./valkey-glide-client"), exports);
14
15
  tslib_1.__exportStar(require("./job"), exports);
15
16
  tslib_1.__exportStar(require("./job-scheduler"), exports);
16
17
  // export * from './main'; this file must not be exported