Skip to content

Commit

Permalink
added more verbosity to recycle process
Browse files Browse the repository at this point in the history
  • Loading branch information
nullivex committed Dec 29, 2014
1 parent 362063b commit 729586f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,9 @@ $ DEBUG=infant* node app

## Changelog

### 0.9.2
* Added more verbosity to worker recycle

### 0.9.1
* Fixed a bug where worker recycle wasnt properly using `worker.disconnect()`
to ensure that all existing connections are handled properly.
Expand Down
4 changes: 2 additions & 2 deletions helpers/Cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ Cluster.prototype.setupWorker = function(worker){
if(that.options.enhanced){
//set a timeout to kill the worker so we dont bleed workers
var disconnectTimeout = setTimeout(function(){
debug('worker ' + worker.id + ' recycle timeout exceeded... ' +
'killed. recycle complete')
worker.kill()
},that.options.recycleTimeout || 5000)
worker.on('disconnect',function(){
clearTimeout(disconnectTimeout)
debug('worker ' + worker.id + ' recycled successfully!')
//console.log('sending stop!')
//worker.send('stop')
})
worker.disconnect()
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "SnailJS <developers@snailjs.org>",
"name": "infant",
"description": "Child process, and cluster helper for Node.js",
"version": "0.9.1",
"version": "0.9.2",
"homepage": "http://snailjs.org/",
"repository": {
"type": "git",
Expand Down

0 comments on commit 729586f

Please sign in to comment.