Add some debug information
This commit is contained in:
@@ -61,9 +61,11 @@ function createJobs(app, schedulerConfig, callback) {
|
||||
// stopJobs only deletes jobs since previous run. This means that when box code restarts, none of the containers
|
||||
// are removed. The deleteContainer here ensures we re-create the cron containers with the latest config
|
||||
docker.deleteContainer(containerName, function ( /* ignoredError */) {
|
||||
docker.createSubcontainer(app, containerName, [ '/bin/sh', '-c', cmd ], { } /* options */, function (error) {
|
||||
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}`);
|
||||
|
||||
var cronJob = new CronJob({
|
||||
cronTime: cronTime, // at this point, the pattern has been validated
|
||||
onTick: () => runTask(appId, taskName, (error) => { // put the app id in closure, so we don't use the outdated app object by mistake
|
||||
@@ -143,7 +145,7 @@ function sync() {
|
||||
});
|
||||
});
|
||||
}, function (error) {
|
||||
if (error) return debug('sync: error creating jobs', error);
|
||||
if (error) return debug('sync: error creating jobs', error.message);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user