(exdecutor) Prevent TriggerAdjacencyCalculationActor from showing up in the actions tab when it isn't running

This commit is contained in:
Viktor Lofgren 2023-10-25 21:25:07 +02:00
parent 97fcbdd6d9
commit abbadc92a0

View File

@ -20,12 +20,12 @@ public class TriggerAdjacencyCalculationActor extends RecordActorPrototype {
private final ProcessService processService;
private final ExecutorService executor = Executors.newSingleThreadExecutor();
public record Initial() implements ActorStep {}
public record Run() implements ActorStep {}
@Override
public ActorStep transition(ActorStep self) throws Exception {
return switch (self) {
case Initial() -> {
case Run() -> {
AtomicBoolean hasError = new AtomicBoolean(false);
var future = executor.submit(() -> {
try {