fix console log for prod

This commit is contained in:
Nolan Lawson 2018-01-20 20:45:31 -08:00
parent 73fbbad0cc
commit c1e7208e11

View file

@ -34,12 +34,16 @@ async function cleanup(instanceName, timeline) {
}
export const cleanupOldStatuses = debounce(async () => {
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)
}
if (process.env.NODE_ENV !== 'production') {
console.log('done cleanupOldStatuses')
}
}, CLEANUP_INTERVAL)