#NEWLINE# def run( self ) : #NEWLINE# #INDENT# import elastic_recheck.elasticRecheck as er #NEWLINE# classifier = er . Classifier ( self . queries , es_url = self . es_url , db_uri = self . db_uri ) #NEWLINE# stream = er . Stream ( self . username , self . host , self . key , es_url = self . es_url ) #NEWLINE# while True : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# event = stream . get_failed_tempest ( ) #NEWLINE# for job in event . failed_jobs : #NEWLINE# #INDENT# job . bugs = set ( classifier . classify ( event . change , event . rev , job . build_short_uuid , recent = True ) ) #NEWLINE# #UNINDENT# if ( not event . get_all_bugs ( ) ) : #NEWLINE# #INDENT# self . _read ( event ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _read ( event ) #NEWLINE# stream . leave_comment ( event , self . msgs , debug = ( not stream . commenting ) ) #NEWLINE# #UNINDENT# #UNINDENT# except er . ResultTimedOut as e : #NEWLINE# #INDENT# self . log . warning ( e . message ) #NEWLINE# self . _read ( msg = e . message ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# self . log . exception ( 'Uncaught exception processing event.' )