@rpcbase/server 0.103.0 → 0.104.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/package.json +1 -1
  2. package/queue/index.js +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.103.0",
3
+ "version": "0.104.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {
package/queue/index.js CHANGED
@@ -10,6 +10,9 @@ const tasks_list = Object.create(null)
10
10
  let worker_queue
11
11
 
12
12
  const worker_add = async(task_name, payload, options) => {
13
+ if (!worker_queue) {
14
+ worker_queue = new Queue("worker-queue", worker_queue_url)
15
+ }
13
16
  const res = await worker_queue.add({task_name, payload}, options)
14
17
  console.log("created task:", task_name, res.id)
15
18
  console.log(payload)