Compare commits

...

1 Commits

Author SHA1 Message Date
Girish Ramakrishnan
2e76b8bed9 Do not restart stopped apps 2020-05-26 07:48:16 -07:00
2 changed files with 4 additions and 0 deletions

View File

@@ -1949,3 +1949,6 @@
* import: fix crash because encryption is unset
* create redis with the correct label
[5.2.3]
* Do not restart stopped apps

View File

@@ -2001,6 +2001,7 @@ function restartAppsUsingAddons(changedAddons, callback) {
apps = apps.filter(app => app.manifest.addons && _.intersection(Object.keys(app.manifest.addons), changedAddons).length !== 0);
apps = apps.filter(app => app.installationState !== exports.ISTATE_ERROR); // remove errored apps. let them be 'repaired' by hand
apps = apps.filter(app => app.installationState !== exports.ISTATE_PENDING_RESTART); // safeguard against tasks being created non-stop restart if we crash on startup
apps = apps.filter(app => app.runState !== exports.RSTATE_STOPPED); // don't start stopped apps
async.eachSeries(apps, function (app, iteratorDone) {
debug(`restartAppsUsingAddons: marking ${app.fqdn} for restart`);