stop apps before updating the databases because postgres will "lock" them preventing import
This commit is contained in:
14
src/apps.js
14
src/apps.js
@@ -2022,11 +2022,17 @@ function restartAppsUsingAddons(changedAddons, callback) {
|
||||
args: {},
|
||||
values: { runState: exports.RSTATE_RUNNING }
|
||||
};
|
||||
addTask(app.id, exports.ISTATE_PENDING_RESTART, task, function (error, result) {
|
||||
if (error) debug(`restartAppsUsingAddons: error marking ${app.fqdn} for restart: ${JSON.stringify(error)}`);
|
||||
else debug(`restartAppsUsingAddons: marked ${app.id} for restart with taskId ${result.taskId}`);
|
||||
|
||||
iteratorDone(); // ignore error
|
||||
// stop apps before updating the databases because postgres will "lock" them preventing import
|
||||
docker.stopContainers(app.id, function (error) {
|
||||
if (error) debug(`restartAppsUsingAddons: error stopping ${app.fqdn}`, error);
|
||||
|
||||
addTask(app.id, exports.ISTATE_PENDING_RESTART, task, function (error, result) {
|
||||
if (error) debug(`restartAppsUsingAddons: error marking ${app.fqdn} for restart: ${JSON.stringify(error)}`);
|
||||
else debug(`restartAppsUsingAddons: marked ${app.id} for restart with taskId ${result.taskId}`);
|
||||
|
||||
iteratorDone(); // ignore error
|
||||
});
|
||||
});
|
||||
}, callback);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user