Starting a worker shows: Worker undefined start, reason: restart
jsdevel opened this issue · comments
According to @asilvas, it should show pid / worker path.
Here's the output I get:
cservice: Worker undefined start, reason: restart
cservice: Worker undefined exited, reason: restart
It would be better to show:
cservice: Worker worker.js:34512 start, reason: restart
cservice: Worker worker.js:34513 exited, reason: restart
Here's my code:
//server.js
var cs = require('cluster-service');
cs.start({
worker:"./worker.js"
});
//worker.js
var express = require('express');
var app = express();
app.get('/', function(req, res){
res.send("hello");
});
app.listen(3000, function(){
console.log("Listening on 3000");
});
Now displays worker filename(pid) start
to avoid confusion with the pid being a port.