@@ -77,7 +77,7 @@ void scheduleEventFromApi(CustomResourceEvent event) {
77
77
if (eventStore .containsNotScheduledEvent (event .resourceUid ())) {
78
78
log .debug ("Replacing not scheduled event with actual event." +
79
79
" New event: {}" , event );
80
- eventStore .addOrReplaceEventAsNotScheduled (event );
80
+ eventStore .addOrReplaceEventAsNotScheduledAndUpdateLastGeneration (event );
81
81
return ;
82
82
}
83
83
if (generationAware && !eventStore .hasLargerGenerationThanLastStored (event )) {
@@ -88,7 +88,7 @@ void scheduleEventFromApi(CustomResourceEvent event) {
88
88
if (eventStore .containsEventUnderProcessing (event .resourceUid ())) {
89
89
log .debug ("Scheduling event for later processing since there is an event under processing for same kind." +
90
90
" New event: {}" , event );
91
- eventStore .addOrReplaceEventAsNotScheduled (event );
91
+ eventStore .addOrReplaceEventAsNotScheduledAndUpdateLastGeneration (event );
92
92
return ;
93
93
}
94
94
scheduleEventForExecution (event );
@@ -108,7 +108,7 @@ private void scheduleEventForExecution(CustomResourceEvent event) {
108
108
log .warn ("Event max retry limit reached. Will be discarded. {}" , event );
109
109
return ;
110
110
}
111
- eventStore .addEventUnderProcessing (event );
111
+ eventStore .addEventUnderProcessingAndUpdateLastGeneration (event );
112
112
executor .schedule (new EventConsumer (event , eventDispatcher , this ),
113
113
nextBackOff .get (), TimeUnit .MILLISECONDS );
114
114
log .trace ("Scheduled task for event: {}" , event );
0 commit comments