diff options
-rwxr-xr-x | src/jobd.js | 2 | ||||
-rw-r--r-- | src/lib/worker.js | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/jobd.js b/src/jobd.js index 298d769..477934f 100755 --- a/src/jobd.js +++ b/src/jobd.js @@ -190,7 +190,7 @@ function onStatus(data, requestNo, connection) { connection.send( new ResponseMessage(requestNo) .setData({ - queue: qs, + targets: qs.targets, jobPromisesCount: Object.keys(jobPromises).length, memoryUsage: process.memoryUsage() }) diff --git a/src/lib/worker.js b/src/lib/worker.js index b09c2f8..562e0b1 100644 --- a/src/lib/worker.js +++ b/src/lib/worker.js @@ -145,10 +145,13 @@ class Worker extends EventEmitter { let status = {targets: {}} for (const targetName in this.targets) { let target = this.targets[targetName] - status.targets[targetName] = {} + status.targets[targetName] = { + paused: target.paused, + slots: {} + } for (const slotName in target.slots) { const queue = target.slots[slotName] - status.targets[targetName][slotName] = { + status.targets[targetName].slots[slotName] = { concurrency: queue.concurrency, length: queue.length, } |