use cluster.on('fork') for adding forks

This commit is contained in:
AJ ONeal 2016-09-08 18:29:12 -06:00
parent 14c4788e8c
commit 34b0aaf460
1 changed files with 3 additions and 1 deletions

View File

@ -11,11 +11,13 @@ if (cluster.isMaster) {
cstore = require('./master').create({
name: 'foo-level'
});
cstore.addWorker(cluster.fork());
cstore.then(function (db) {
db.set('foo', 'bar');
});
cluster.fork();
cluster.fork();
}
else {