From b61b8640947d44c4521d60744d7538e0515a3729 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sat, 17 Oct 2015 13:57:19 -0700 Subject: [PATCH] make callback noop --- src/janitor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/janitor.js b/src/janitor.js index 2802e11b0..2f0ca9994 100644 --- a/src/janitor.js +++ b/src/janitor.js @@ -12,6 +12,8 @@ exports = module.exports = { cleanupDockerVolumes: cleanupDockerVolumes }; +var NOOP_CALLBACK = function () { }; + function ignoreError(func) { return function (callback) { func(function (error) { @@ -83,6 +85,8 @@ function cleanupTmpVolume(containerInfo, callback) { function cleanupDockerVolumes(callback) { assert(!callback || typeof callback === 'function'); // callback is null when called from cronjob + callback = callback || NOOP_CALLBACK; + debug('Cleaning up docker volumes'); docker.listContainers(function (error, containers) {