use cluster.on('fork') for adding forks
This commit is contained in:
джерело
14c4788e8c
коміт
34b0aaf460
4
test.js
4
test.js
|
@ -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 {
|
||||
|
|
Завантаження…
Посилання в новій задачі