@@ -110,7 +110,10 @@ void eventProcessingFinished(
110
110
ExecutionScope executionScope , PostExecutionControl postExecutionControl ) {
111
111
try {
112
112
lock .lock ();
113
- log .debug ("Event processing finished. Scope: {}" , executionScope );
113
+ log .debug (
114
+ "Event processing finished. Scope: {}, PostExecutionControl: {}" ,
115
+ executionScope ,
116
+ postExecutionControl );
114
117
unsetUnderExecution (executionScope .getCustomResourceUid ());
115
118
116
119
if (retry != null && postExecutionControl .exceptionDuringExecution ()) {
@@ -143,18 +146,27 @@ private void handleRetryOnException(ExecutionScope executionScope) {
143
146
eventBuffer .putBackEvents (executionScope .getCustomResourceUid (), executionScope .getEvents ());
144
147
145
148
if (newEventsExists ) {
149
+ log .debug ("New events exists for for resource id: {}" , executionScope .getCustomResourceUid ());
146
150
executeBufferedEvents (executionScope .getCustomResourceUid ());
147
151
return ;
148
152
}
149
153
Optional <Long > nextDelay = execution .nextDelay ();
154
+
150
155
nextDelay .ifPresent (
151
- delay ->
152
- eventSourceManager
153
- .getRetryTimerEventSource ()
154
- .scheduleOnce (executionScope .getCustomResource (), delay ));
156
+ delay -> {
157
+ log .debug (
158
+ "Scheduling timer event for retry with delay:{} for resource: {}" ,
159
+ delay ,
160
+ executionScope .getCustomResourceUid ());
161
+ eventSourceManager
162
+ .getRetryTimerEventSource ()
163
+ .scheduleOnce (executionScope .getCustomResource (), delay );
164
+ });
155
165
}
156
166
157
167
private void markSuccessfulExecutionRegardingRetry (ExecutionScope executionScope ) {
168
+ log .debug (
169
+ "Marking successful execution for resource: {}" , executionScope .getCustomResourceUid ());
158
170
retryState .remove (executionScope .getCustomResourceUid ());
159
171
eventSourceManager
160
172
.getRetryTimerEventSource ()
0 commit comments