feat(*): skip executions based on flow identifiers

Fixes #3383
This commit is contained in:
Loïc Mathieu
2024-04-11 15:53:42 +02:00
parent 504d4a2868
commit d71ff2b1ee
7 changed files with 95 additions and 16 deletions

View File

@@ -44,9 +44,6 @@ public class MemoryExecutor implements ExecutorInterface {
private List<Flow> allFlows;
private final ScheduledExecutorService schedulerDelay = Executors.newSingleThreadScheduledExecutor();
@Inject
private ApplicationContext applicationContext;
@Inject
private FlowRepositoryInterface flowRepository;
@@ -124,7 +121,7 @@ public class MemoryExecutor implements ExecutorInterface {
}
Execution message = either.getLeft();
if (skipExecutionService.skipExecution(message.getId())) {
if (skipExecutionService.skipExecution(message)) {
log.warn("Skipping execution {}", message.getId());
return;
}
@@ -369,7 +366,7 @@ public class MemoryExecutor implements ExecutorInterface {
WorkerTaskResult message = either.getLeft();
if (skipExecutionService.skipExecution(message.getTaskRun().getExecutionId())) {
if (skipExecutionService.skipExecution(message.getTaskRun())) {
log.warn("Skipping execution {}", message.getTaskRun().getExecutionId());
return;
}
@@ -426,7 +423,7 @@ public class MemoryExecutor implements ExecutorInterface {
log.warn("Skipping execution {}", message.getExecutionId());
return;
}
if (skipExecutionService.skipExecution(message.getParentTaskRun().getExecutionId())) {
if (skipExecutionService.skipExecution(message.getParentTaskRun())) {
log.warn("Skipping execution {}", message.getParentTaskRun().getExecutionId());
return;
}