make callback noop

This commit is contained in:
Girish Ramakrishnan
2015-10-17 13:57:19 -07:00
parent fa193276c9
commit b61b864094
+4
View File
@@ -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) {