#NEWLINE# def process_one_batch( self ) : #NEWLINE# #INDENT# slow_queries = self . q . drain_queue ( 'slow_queries' , json = True ) #NEWLINE# if ( settings . ERROR_BOT is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( len ( slow_queries ) > 0 ) : #NEWLINE# #INDENT# topic = ( '%s: slow queries' % ( settings . EXTERNAL_HOST , ) ) #NEWLINE# content = '' #NEWLINE# for query in slow_queries : #NEWLINE# #INDENT# content += ( '    %s\n' % ( query , ) ) #NEWLINE# #UNINDENT# internal_send_message ( settings . ERROR_BOT , 'stream' , 'logs' , self , content ) #NEWLINE# #UNINDENT# reset_queries ( )