diff --git a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java index 0b4396048..b70c4c5ed 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java @@ -105,12 +105,6 @@ void restart(String workflowId, boolean useLatestDefinitions) */ WorkflowModel decide(String workflowId); - /** - * @param workflow workflow to be evaluated - * @return updated workflow - */ - WorkflowModel decideWithLock(WorkflowModel workflow); - /** * @param workflowId id of the workflow to be terminated * @param reason termination reason to be recorded diff --git a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutorOps.java b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutorOps.java index 8c8db4b57..f40a32297 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutorOps.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutorOps.java @@ -1039,33 +1039,6 @@ public WorkflowModel decide(String workflowId) { } } - /** - * This method overloads the {@link #decide(String)}. It will acquire a lock and evaluate the - * state of the workflow. - * - * @param workflow the workflow to evaluate the state for - * @return the workflow - */ - @Override - public WorkflowModel decideWithLock(WorkflowModel workflow) { - if (workflow == null) { - return null; - } - StopWatch watch = new StopWatch(); - watch.start(); - if (!executionLockService.acquireLock(workflow.getWorkflowId())) { - return null; - } - try { - return decide(workflow); - - } finally { - executionLockService.releaseLock(workflow.getWorkflowId()); - watch.stop(); - Monitors.recordWorkflowDecisionTime(watch.getTime()); - } - } - /** * @param workflow the workflow to evaluate the state for * @return true if the workflow has completed (success or failed), false otherwise. Note: This diff --git a/core/src/main/java/com/netflix/conductor/core/reconciliation/WorkflowSweeper.java b/core/src/main/java/com/netflix/conductor/core/reconciliation/WorkflowSweeper.java index 69fa4da7d..6656e6a75 100644 --- a/core/src/main/java/com/netflix/conductor/core/reconciliation/WorkflowSweeper.java +++ b/core/src/main/java/com/netflix/conductor/core/reconciliation/WorkflowSweeper.java @@ -92,7 +92,7 @@ public void sweep(String workflowId) { workflowRepairService.verifyAndRepairWorkflowTasks(workflow); } long decideStartTime = System.currentTimeMillis(); - workflow = workflowExecutor.decide(workflow); + workflow = workflowExecutor.decide(workflow.getWorkflowId()); Monitors.recordWorkflowDecisionTime(System.currentTimeMillis() - decideStartTime); if (workflow != null && workflow.getStatus().isTerminal()) { queueDAO.remove(DECIDER_QUEUE, workflowId);