mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
force fork mode for node 0.10.x
This commit is contained in:
parent
4a24746281
commit
9c3dcc995d
10
lib/CLI.js
10
lib/CLI.js
@ -108,9 +108,13 @@ CLI.start = function(script, opts, cb) {
|
||||
|
||||
if (appConf['exec_mode'] == 'cluster_mode' &&
|
||||
process.version.match(/0.10/) &&
|
||||
(parseInt(appConf.instances) == 1 || !appConf.instances)) {
|
||||
//appConf['exec_mode'] = 'fork_mode';
|
||||
printOut('\x1B[31m[PM2] [WARNING] \x1B[39m you\'re using the 0.10.x node version, it\'s prefered that you switch to fork mode by adding the -x parameter. 0.11.x can use cluster_mode (default mode) efficiently.');
|
||||
!opts.force &&
|
||||
!process.env.TRAVIS) {
|
||||
|
||||
appConf['exec_mode'] = 'fork_mode';
|
||||
appConf['instances'] = 1;
|
||||
|
||||
printOut(chalk.red('\x1B[31m[PM2] As you use Node.JS 0.10.X your application is switched to fork_mode by default (adding -x option).\nIf you want to use clusters features, launch PM2 with Node.JS 0.11.13 or use -f to force.'));
|
||||
}
|
||||
|
||||
// Script arguments
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user