God.finalizeProcedure now checks is proc is not stopped or stopping

This commit is contained in:
Joni Shkurti 2014-10-08 12:49:32 +02:00
parent 9fa947c59f
commit 321a6d8fc3

View File

@ -361,7 +361,11 @@ God.finalizeProcedure = function finalizeProcedure(proc) {
var proc = God.clusters_db[proc_id];
if (!proc) return console.error('Proc is not defined anymore');
if (!proc ||
proc.pm2_env.status == cst.STOPPED_STATUS ||
proc.pm2_env.status == cst.STOPPING_STATUS) {
return console.error('Proc is not defined anymore or is being killed');
}
if (!err) {
proc.pm2_env.versioning = meta;