|
24 | 24 | import com.bytechef.atlas.coordinator.event.ApplicationEvent; |
25 | 25 | import com.bytechef.atlas.coordinator.event.ErrorEvent; |
26 | 26 | import com.bytechef.atlas.coordinator.event.JobStatusApplicationEvent; |
27 | | -import com.bytechef.atlas.coordinator.event.TaskExecutionErrorEvent; |
28 | 27 | import com.bytechef.atlas.coordinator.event.StartJobEvent; |
29 | 28 | import com.bytechef.atlas.coordinator.event.TaskExecutionCompleteEvent; |
| 29 | +import com.bytechef.atlas.coordinator.event.TaskExecutionErrorEvent; |
30 | 30 | import com.bytechef.atlas.coordinator.event.listener.ApplicationEventListener; |
31 | 31 | import com.bytechef.atlas.coordinator.event.listener.TaskExecutionErrorEventListener; |
32 | 32 | import com.bytechef.atlas.coordinator.event.listener.TaskStartedApplicationEventListener; |
|
84 | 84 | import java.util.function.Supplier; |
85 | 85 | import java.util.stream.Stream; |
86 | 86 | import org.apache.commons.lang3.Validate; |
| 87 | +import org.slf4j.Logger; |
| 88 | +import org.slf4j.LoggerFactory; |
87 | 89 | import org.springframework.boot.autoconfigure.thread.Threading; |
88 | 90 | import org.springframework.context.ApplicationEventPublisher; |
89 | 91 | import org.springframework.core.env.Environment; |
|
95 | 97 | */ |
96 | 98 | public class JobSyncExecutor { |
97 | 99 |
|
| 100 | + private static final Logger logger = LoggerFactory.getLogger(JobSyncExecutor.class); |
| 101 | + |
98 | 102 | private static final List<String> WEBHOOK_COMPONENTS = List.of("apiPlatform", "chat", "webhook"); |
99 | 103 | private static final int NO_TIMEOUT = -1; |
100 | 104 | private static final int UNLIMITED_TASK_EXECUTIONS = -1; |
@@ -148,7 +152,7 @@ public JobSyncExecutor( |
148 | 152 | this.timeout = timeout; |
149 | 153 | this.workflowService = workflowService; |
150 | 154 |
|
151 | | - syncMessageBroker.receive(TaskCoordinatorMessageRoute.JOB_STOP_EVENTS, event -> {}); |
| 155 | + receive(memoryMessageBroker, TaskCoordinatorMessageRoute.JOB_STOP_EVENTS, event -> {}); |
152 | 156 |
|
153 | 157 | TaskHandlerResolverChain taskHandlerResolverChain = new TaskHandlerResolverChain(); |
154 | 158 |
|
@@ -202,7 +206,7 @@ public JobSyncExecutor( |
202 | 206 | TaskExecutionErrorEventListener taskExecutionErrorEventListener = new TaskExecutionErrorEventListener( |
203 | 207 | eventPublisher, jobService, taskDispatcherChain, taskExecutionService); |
204 | 208 |
|
205 | | - syncMessageBroker.receive(TaskCoordinatorMessageRoute.ERROR_EVENTS, |
| 209 | + receive(memoryMessageBroker, TaskCoordinatorMessageRoute.ERROR_EVENTS, |
206 | 210 | event -> taskExecutionErrorEventListener.onErrorEvent((ErrorEvent) event)); |
207 | 211 |
|
208 | 212 | JobExecutor jobExecutor = new JobExecutor( |
|
0 commit comments