qrusty-client 0.15.1 → 0.17.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/README.md +4 -0
- package/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -27,6 +27,10 @@ const client = new QrustyClient("http://localhost:6784");
|
|
|
27
27
|
(async () => {
|
|
28
28
|
await client.createQueue("orders", "MaxFirst", true);
|
|
29
29
|
await client.publish("orders", 100, { order_id: 123 });
|
|
30
|
+
|
|
31
|
+
// Text priorities are also supported for queues with priority_kind: "Text"
|
|
32
|
+
await client.createQueue("tags", "MinFirst", true, "Text");
|
|
33
|
+
await client.publish("tags", "alpha", { tag: "first" });
|
|
30
34
|
const msg = await client.consume("orders", "worker-1");
|
|
31
35
|
if (msg) {
|
|
32
36
|
await client.ack("orders", msg.id, "worker-1");
|
package/index.js
CHANGED
|
@@ -73,7 +73,7 @@ class QrustyClient {
|
|
|
73
73
|
/**
|
|
74
74
|
* Publish a message to a queue
|
|
75
75
|
* @param {string} queue
|
|
76
|
-
* @param {number} priority
|
|
76
|
+
* @param {number|string} priority
|
|
77
77
|
* @param {object} payload
|
|
78
78
|
* @param {number} [maxRetries=3]
|
|
79
79
|
* @returns {Promise<object>}
|
|
@@ -200,7 +200,7 @@ class QrustyClient {
|
|
|
200
200
|
* @property {string} queue
|
|
201
201
|
* @property {string} id
|
|
202
202
|
* @property {string} payload
|
|
203
|
-
* @property {number} priority
|
|
203
|
+
* @property {number|string} priority
|
|
204
204
|
* @property {string} createdAt
|
|
205
205
|
*/
|
|
206
206
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qrusty-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
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>",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"docs": "jsdoc -c jsdoc.json"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"axios": "^1.13.
|
|
13
|
+
"axios": "^1.13.6",
|
|
14
14
|
"ws": "^8.19.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|