1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-12 02:07:26 +01:00

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 () => { 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 knownDbs = (await keyval.get('known_dbs')) || {}
let dbNames = Object.keys(knownDbs) let dbNames = Object.keys(knownDbs)
for (let dbName of dbNames) { for (let dbName of dbNames) {
let [ instanceName, timeline ] = knownDbs[dbName] let [ instanceName, timeline ] = knownDbs[dbName]
await cleanup(instanceName, timeline) await cleanup(instanceName, timeline)
} }
console.log('done cleanupOldStatuses') if (process.env.NODE_ENV !== 'production') {
console.log('done cleanupOldStatuses')
}
}, CLEANUP_INTERVAL) }, CLEANUP_INTERVAL)