Compare commits

...

1 Commits

Author SHA1 Message Date
Girish Ramakrishnan
0a91e6b2c0 scheduler: do not create jobs of suspended apps
otherwise, when an app is uninstalling, it creates the docker containers
by calling getDynamicEnvironment. This ends up adding addonConfigs for the
docker addon and prevents the app from getting uninstalled.
2024-03-11 23:34:08 +01:00

View File

@@ -136,7 +136,7 @@ async function sync() {
if (_.isEqual(appState.schedulerConfig, schedulerConfig) && appState.containerId === app.containerId) continue; // nothing changed
}
debug(`sync: adding jobs of ${app.id} (${app.fqdn})`);
debug(`sync: clearing jobs of ${app.id} (${app.fqdn})`);
const [error] = await safe(stopJobs(app.id, appState));
if (error) debug(`sync: error stopping jobs of ${app.id} : ${error.message}`);
@@ -146,6 +146,8 @@ async function sync() {
continue;
}
if (gSuspendedAppIds.has(app.d)) continue; // do not create jobs of suspended apps
const cronJobs = await createJobs(app, schedulerConfig); // if docker is down, the next sync() will recreate everything for this app
gState[app.id] = { containerId: app.containerId, schedulerConfig, cronJobs };
}