fix console log for prod
This commit is contained in:
		
							parent
							
								
									73fbbad0cc
								
							
						
					
					
						commit
						c1e7208e11
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -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) | ||||
		Loading…
	
	Add table
		
		Reference in a new issue