#NEWLINE# def optimize_db( context , database , table ) : #NEWLINE# #INDENT# 'Optimize database' #NEWLINE# LOGGER . info ( 'Optimizing database %s' , database ) #NEWLINE# repos = repository . Repository ( database , context , table = database ) #NEWLINE# repos . engine . connect ( ) . execute ( 'VACUUM ANALYZE' ) . close ( )