ensure boolean
This commit is contained in:
@@ -66,7 +66,7 @@ function sync(callback) {
|
||||
return iteratorDone(); // nothing changed
|
||||
}
|
||||
|
||||
var killContainers = appState && !appState.cronJobs; // keep the old containers on 'startup'
|
||||
var killContainers = appState && !appState.cronJobs ? true : false; // keep the old containers on 'startup'
|
||||
stopJobs(app.id, appState, killContainers, function (error) {
|
||||
if (error) debug('Error stopping jobs for %s : %s', app.id, error.message);
|
||||
|
||||
@@ -107,8 +107,9 @@ function killContainer(containerId, callback) {
|
||||
|
||||
function stopJobs(appId, appState, killContainers, callback) {
|
||||
assert.strictEqual(typeof appId, 'string');
|
||||
assert.strictEqual(typeof killContainers, 'boolean');
|
||||
assert.strictEqual(typeof appState, 'object');
|
||||
assert.strictEqual(typeof killContainers, 'boolean');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
debug('stopJobs for %s', appId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user