From db047c548a54393bad822937c552be066d9fa7ef Mon Sep 17 00:00:00 2001 From: zhouwanbin Date: Mon, 27 Nov 2023 17:49:20 +0800 Subject: [PATCH] fix time out --- .../conductor/core/reconciliation/WorkflowSweeper.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 cd4b46be75..08a7927595 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 @@ -149,9 +149,13 @@ void unack(WorkflowModel workflowModel, long workflowOffsetTimeout) { postponeDurationSeconds = taskDef.getPollTimeoutSeconds() + 1; } else { postponeDurationSeconds = - (workflowModel.getWorkflowDefinition().getTimeoutSeconds() != 0) - ? workflowModel.getWorkflowDefinition().getTimeoutSeconds() - + 1 + workflowModel.getWorkflowDefinition().getTimeoutSeconds(); + if (postponeDurationSeconds > taskModel.getResponseTimeoutSeconds()) { + postponeDurationSeconds = taskModel.getResponseTimeoutSeconds(); + } + postponeDurationSeconds = + (postponeDurationSeconds != 0) + ? postponeDurationSeconds + 1 : workflowOffsetTimeout; } } else {