diff --git a/lib/worker.js b/lib/worker.js index 091ff66..69fe4fd 100644 --- a/lib/worker.js +++ b/lib/worker.js @@ -120,6 +120,7 @@ TWorker.prototype.process = function (cb) { ping: this.ping, sleep: this.sleep, type: this.type, + queue: this.queue.name, taskCount: this.taskCount, status: 'waiting' }, this.loop.bind(this)); @@ -235,4 +236,4 @@ TWorker.prototype.close = function (options, cb) { async.parallel(actions, wrapCallback(worker, cb)); } -}; \ No newline at end of file +}; diff --git a/test/worker.js b/test/worker.js index d2b28f5..357198a 100644 --- a/test/worker.js +++ b/test/worker.js @@ -187,6 +187,7 @@ describe('Taskman worker', function () { expect(infos).to.have.property('ping', '1000'); expect(infos).to.have.property('sleep', '0'); expect(infos).to.have.property('type', 'fifo'); + expect(infos).to.have.property('queue', 'test'); expect(infos).to.have.property('taskCount', '1'); expect(infos).to.have.property('status', 'working'); next(); @@ -301,4 +302,4 @@ describe('Taskman worker', function () { }); }); }); -}); \ No newline at end of file +});