Skip to content

Commit

Permalink
changes in task timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Shailesh Jagannath Padave committed Nov 29, 2024
1 parent ba2766d commit d88f973
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,16 @@ void checkTaskTimeout(TaskDef taskDef, TaskModel task) {
long elapsedTimeFromFirstTaskExecution =
now - (task.getFirstStartTime() + ((long) task.getStartDelayInSeconds() * 1000L));

if (elapsedTimeFromFirstTaskExecution < totalTaskTimeout && elapsedTime < timeout) {
return;
if (totalTaskTimeout > 0) {
// If totalTaskTimeout is greater than 0, check both conditions
if (elapsedTimeFromFirstTaskExecution < totalTaskTimeout && elapsedTime < timeout) {
return;
}
} else {
// If totalTaskTimeout is not greater than 0, only check the timeout condition
if (elapsedTime < timeout) {
return;
}
}

String reason =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@
"workflowStatusListenerEnabled": false,
"timeoutPolicy": "ALERT_ONLY",
"timeoutSeconds": 0,
"totalTimeoutSeconds": 50,
"ownerEmail": "[email protected]"
}

0 comments on commit d88f973

Please sign in to comment.