#NEWLINE# @ user_method #NEWLINE# def retry_failed( self ) : #NEWLINE# #INDENT# cutoff = ( datetime . utcnow ( ) - timedelta ( hours = 1 ) ) #NEWLINE# jobs = NAMESPACE . session . query ( Job ) . filter ( ( ~ Job . built_binaries . any ( ) ) , Job . check . has ( ( Check . build == True ) ) , ( Job . finished_at != None ) , ( Job . finished_at < cutoff ) ) #NEWLINE# for job in jobs : #NEWLINE# #INDENT# versions = NAMESPACE . session . query ( Source . version ) . filter ( ( Source . group_suite == job . source . group_suite ) , ( Source . name == job . source . name ) ) #NEWLINE# max_version = max ( [ x [ 0 ] for x in versions ] , key = Version ) #NEWLINE# if ( job . source . version != max_version ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# job . failed = None #NEWLINE# job . builder = None #NEWLINE# job . assigned_at = None #NEWLINE# job . finished_at = None