-
-
Save tim-kos/0da0f2f6559646aa2076 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clusterMaster = require("cluster-master"); | |
process.env.CLUSTER_MASTER_REPL = '7777'; | |
clusterMaster({ | |
exec : __dirname + "/server-worker.js", | |
size : 2, | |
env : process.env, | |
args : ["--deep", "doop"], | |
silent : false, | |
signals : false, | |
repl : false, | |
onMessage: function (msg) { | |
// console.error("Message from %s %j", this.uniqueID, msg); | |
} | |
}); | |
setInterval(function() { | |
console.log("DOING RESTART"); | |
clusterMaster.restart(); | |
}, 10000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment