diff --git a/src/scheduler.js b/src/scheduler.js index 85a284629..96ca4c49a 100644 --- a/src/scheduler.js +++ b/src/scheduler.js @@ -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 }; }