Skip to content
This repository was archived by the owner on Feb 27, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
node_modules
7 changes: 4 additions & 3 deletions cluster-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var cluster = require("cluster")
, util = require('util')
, minRestartAge = 2000
, danger = false
, d = require("debug")("cluster-master")

exports = module.exports = clusterMaster
exports.restart = restart
Expand All @@ -24,7 +25,7 @@ exports.quit = quit

var debugStreams = {}
function debug () {
console.error.apply(console, arguments)
d.apply(d, arguments)

var msg = util.format.apply(util, arguments)
Object.keys(debugStreams).forEach(function (s) {
Expand Down Expand Up @@ -122,7 +123,7 @@ function setupRepl () {
}

function startRepl () {
console.error('starting repl on '+socket+'=')
debug('starting repl on '+socket+'=')
process.on('exit', function() {
try { fs.unlinkSync(socket) } catch (er) {}
})
Expand Down Expand Up @@ -400,7 +401,7 @@ function resize (n, cb_) {
return

function cb() {
console.error('done resizing')
debug('done resizing')

resizing = false
var q = resizeCbs.slice(0)
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"engines": {
"node": ">=0.7.7"
},
"license": "BSD"
"license": "BSD",
"dependencies": {
"debug": "^1.0.2"
}
}