better logs of the scheduler

This commit is contained in:
Girish Ramakrishnan
2020-09-09 20:09:16 -07:00
parent e730a6e282
commit e3b4fdb6b1
+2 -2
View File
@@ -64,7 +64,7 @@ function createJobs(app, schedulerConfig, callback) {
docker.createSubcontainer(app, containerName, [ '/bin/sh', '-c', cmd ], { } /* options */, function (error, container) {
if (error && error.reason !== BoxError.ALREADY_EXISTS) return iteratorDone(error);
debug(`createJobs: ${taskName} will run in container ${container.id}`);
debug(`createJobs: ${taskName} (${app.fqdn}) will run in container ${container.id}`);
var cronJob = new CronJob({
cronTime: cronTime, // at this point, the pattern has been validated
@@ -128,7 +128,7 @@ function sync() {
if (_.isEqual(appState.schedulerConfig, schedulerConfig) && appState.containerId === app.containerId) return iteratorDone(); // nothing changed
}
debug(`sync: adding jobs of ${app.id}`);
debug(`sync: adding jobs of ${app.id} (${app.fqdn})`);
stopJobs(app.id, appState, function (error) {
if (error) debug(`sync: error stopping jobs of ${app.id} : ${error.message}`);