Skip to content

Commit

Permalink
small improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
Cabecinha84 committed Jan 5, 2024
1 parent 262c2fa commit 0e81f53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ZelBack/src/services/appsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -10055,6 +10055,7 @@ async function appDockerRestart(appname) {
const isComponent = appname.includes('_'); // it is a component restart. Proceed with restarting just component
if (isComponent) {
await dockerService.appDockerRestart(appname);
startAppMonitoring(appname);
} else {
// ask for restarting entire composed application
// eslint-disable-next-line no-use-before-define
Expand All @@ -10064,11 +10065,13 @@ async function appDockerRestart(appname) {
}
if (appSpecs.version <= 3) {
await dockerService.appDockerRestart(appname);
startAppMonitoring(appname);
} else {
// eslint-disable-next-line no-restricted-syntax
for (const appComponent of appSpecs.compose) {
// eslint-disable-next-line no-await-in-loop
await dockerService.appDockerRestart(`${appComponent.name}_${appSpecs.name}`);
startAppMonitoring(`${appComponent.name}_${appSpecs.name}`);
}
}
}
Expand Down Expand Up @@ -10283,7 +10286,6 @@ async function syncthingApps() {
syncthingFolder.type = 'sendreceive';
// eslint-disable-next-line no-await-in-loop
await appDockerRestart(id);
startAppMonitoring(appId);
cache.restarted = true;
}
receiveOnlySyncthingAppsCache.set(appId, cache);
Expand Down Expand Up @@ -10448,7 +10450,6 @@ async function syncthingApps() {
syncthingFolder.type = 'sendreceive';
// eslint-disable-next-line no-await-in-loop
await appDockerRestart(id);
startAppMonitoring(appId);
cache.restarted = true;
}
receiveOnlySyncthingAppsCache.set(appId, cache);
Expand Down Expand Up @@ -10654,7 +10655,6 @@ async function masterSlaveApps() {
if ((!ip || serverStatus === 'DOWN')) {
if (!runningAppsNames.includes(identifier)) {
appDockerRestart(installedApp.name);
startAppMonitoring(appId);
log.info(`masterSlaveApps: starting docker app:${installedApp.name}`);
}
} else {
Expand Down

0 comments on commit 0e81f53

Please sign in to comment.