From 4c6f7de10afa137dfc2aa5508d3b1cb9d0fefdf8 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 23 Nov 2022 22:03:18 +0100 Subject: [PATCH] more debug messages --- src/janitor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/janitor.js b/src/janitor.js index 9849f415a..c964c4701 100644 --- a/src/janitor.js +++ b/src/janitor.js @@ -28,7 +28,7 @@ async function cleanupTmpVolume(containerInfo) { const cmd = 'find /tmp -type f -mtime +10 -exec rm -rf {} +'.split(' '); // 10 day old files - debug('cleanupTmpVolume %j', containerInfo.Names); + debug(`cleanupTmpVolume ${JSON.stringify(containerInfo.Names)}`); const [error, execContainer] = await safe(gConnection.getContainer(containerInfo.Id).exec({ Cmd: cmd, AttachStdout: true, AttachStderr: true, Tty: false })); if (error) throw new BoxError(BoxError.DOCKER_ERROR, `Failed to exec container: ${error.message}`); @@ -53,4 +53,6 @@ async function cleanupDockerVolumes() { for (const container of containers) { await safe(cleanupTmpVolume(container), { debug }); // intentionally ignore error } + + debug('Cleaned up docker volumes'); }