(god) launch one by one to avoid race condition #2984

This commit is contained in:
vmarchaud 2017-06-29 12:08:09 +02:00
parent 7242fd9685
commit 16b79d3aeb

View File

@ -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