qrusty-client 0.7.0 → 0.9.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.
Files changed (2) hide show
  1. package/index.js +11 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -447,6 +447,17 @@ class WsSession {
447
447
  const resp = await this._request({ type: "batch-nack", queue, ids });
448
448
  return { unlocked: resp.unlocked, dropped: resp.dropped };
449
449
  }
450
+
451
+ /**
452
+ * Renew (extend) the lock on a message by 30 seconds.
453
+ * Implements: WS-0020
454
+ * @param {string} queue
455
+ * @param {string} id
456
+ * @returns {Promise<void>}
457
+ */
458
+ async renew(queue, id) {
459
+ await this._request({ type: "renew", queue, id });
460
+ }
450
461
  }
451
462
 
452
463
  module.exports = { QrustyClient, WsSession };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qrusty-client",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Node.js client for the qrusty priority queue server API.",
5
5
  "main": "index.js",
6
6
  "author": "Gordon Greene <greeng3@obscure-reference.com>",