File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -638,6 +638,14 @@ def _find_unprocessed_node(self, chunksize):
638
638
'updated__lt' : datetime .datetime .now () - datetime .timedelta (minutes = 5 ),
639
639
'limit' : chunksize ,
640
640
})
641
+ nodes = [
642
+ node for node in nodes
643
+ if not (
644
+ node ["kind" ] in ("kbuild" , "job" )
645
+ and node ["result" ] == "incomplete"
646
+ and node ["retry_counter" ] != 3
647
+ )
648
+ ]
641
649
except Exception as exc :
642
650
self .log .error (f"Failed to find unprocessed nodes: { str (exc )} " )
643
651
return []
@@ -701,6 +709,10 @@ def _run(self, context):
701
709
node = None
702
710
try :
703
711
node , is_hierarchy = self ._api_helper .receive_event_node (context ['sub_id' ])
712
+ if node ["kind" ] in ("kbuild" , "job" ):
713
+ if node ["result" ] == "incomplete" and node ["retry_counter" ] != 3 :
714
+ # Only send final retry for incomplete jobs
715
+ continue
704
716
except Exception as e :
705
717
self .log .error (f"Error receiving event: { e } , re-subscribing in 10 seconds" )
706
718
time .sleep (10 )
You can’t perform that action at this time.
0 commit comments