Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
james-deee committed May 2, 2023
1 parent 34e37ef commit e131870
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Predicate;

import com.netflix.conductor.core.exception.NotFoundException;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -26,6 +25,7 @@
import com.netflix.conductor.annotations.VisibleForTesting;
import com.netflix.conductor.common.metadata.tasks.TaskType;
import com.netflix.conductor.core.config.ConductorProperties;
import com.netflix.conductor.core.exception.NotFoundException;
import com.netflix.conductor.core.execution.tasks.SystemTaskRegistry;
import com.netflix.conductor.core.execution.tasks.WorkflowSystemTask;
import com.netflix.conductor.core.utils.QueueUtils;
Expand Down Expand Up @@ -103,8 +103,12 @@ public boolean verifyAndRepairWorkflow(String workflowId, boolean includeTasks)

/** Verify and repair tasks in a workflow. */
public void verifyAndRepairWorkflowTasks(String workflowId) {
WorkflowModel workflow = Optional.ofNullable(executionDAO.getWorkflow(workflowId, true))
.orElseThrow(() -> new NotFoundException("Could not find workflow: " + workflowId));
WorkflowModel workflow =
Optional.ofNullable(executionDAO.getWorkflow(workflowId, true))
.orElseThrow(
() ->
new NotFoundException(
"Could not find workflow: " + workflowId));
workflow.getTasks().forEach(this::verifyAndRepairTask);
// repair the parent workflow if needed
verifyAndRepairWorkflow(workflow.getParentWorkflowId());
Expand Down

0 comments on commit e131870

Please sign in to comment.