mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
(god) launch one by one to avoid race condition #2984
This commit is contained in:
parent
7242fd9685
commit
16b79d3aeb
@ -405,14 +405,15 @@ God.prepare = function prepare (env, cb) {
|
||||
env.instances = 1;
|
||||
}
|
||||
|
||||
async.times(env.instances, function (n, next) {
|
||||
async.timesLimit(env.instances, 1, function (n, next) {
|
||||
env.vizion_running = false;
|
||||
if (env.env && env.env.vizion_running) {
|
||||
env.env.vizion_running = false;
|
||||
}
|
||||
|
||||
God.injectVariables(env, function inject (_err, proc) {
|
||||
return God.executeApp(Utility.clone(proc), function (err, clu) {
|
||||
God.injectVariables(env, function inject (err, _env) {
|
||||
if (err) return next(err);
|
||||
return God.executeApp(Utility.clone(_env), function (err, clu) {
|
||||
if (err) return next(err);
|
||||
God.notify('start', clu, true);
|
||||
// here call next wihtout an array because
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user