From c1e7208e1182a90d92a4bd6d99d53f88e2f3c5e9 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 20 Jan 2018 20:45:31 -0800 Subject: [PATCH] fix console log for prod --- routes/_utils/database/cleanup.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/routes/_utils/database/cleanup.js b/routes/_utils/database/cleanup.js index 58af9c8d..499abc02 100644 --- a/routes/_utils/database/cleanup.js +++ b/routes/_utils/database/cleanup.js @@ -34,12 +34,16 @@ async function cleanup(instanceName, timeline) { } export const cleanupOldStatuses = debounce(async () => { - console.log('cleanupOldStatuses') + if (process.env.NODE_ENV !== 'production') { + console.log('cleanupOldStatuses') + } let knownDbs = (await keyval.get('known_dbs')) || {} let dbNames = Object.keys(knownDbs) for (let dbName of dbNames) { let [ instanceName, timeline ] = knownDbs[dbName] await cleanup(instanceName, timeline) } - console.log('done cleanupOldStatuses') + if (process.env.NODE_ENV !== 'production') { + console.log('done cleanupOldStatuses') + } }, CLEANUP_INTERVAL) \ No newline at end of file