def database_gc(self): """ Remove database that are not up to date """ try: # We try, if we cannot this is maybe because the db is loaded and will be refreshed by its owner for conf in searchFiles(confdir.cache, lambda _,ext: ext in ['db', 'dbm'] ): if not Database.isDbUpToDate ( conf ): logger.info ( 'Cleaning obsolete database %s', conf ); os.remove(conf) continue except: logger.warning ( 'Database cannot be cleaned %s', sys.exc_info()[1] );