-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Changes: - add new config 'kestra.server.workerTaskRestartStrategy' - update default value for 'kestra.server.liveness.initialDelay' to match timeout - fix schedule initial delay to 0 - cleanup javadoc Fix: #3343 Fix: #3351
- Loading branch information
1 parent
96f1eef
commit 89573d6
Showing
15 changed files
with
169 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
core/src/main/java/io/kestra/core/server/WorkerTaskRestartStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.kestra.core.server; | ||
|
||
/** | ||
* The supported strategies for restarting tasks on worker failure. | ||
*/ | ||
public enum WorkerTaskRestartStrategy { | ||
|
||
/** | ||
* Tasks are never restarted on worker failure. | ||
*/ | ||
NEVER, | ||
/** | ||
* Tasks are restarted immediately on worker failure, i.e., as soon as a worker id detected as disconnected. | ||
* This strategy is used to reduce task recovery times at the risk of introducing duplicate executions. | ||
*/ | ||
IMMEDIATELY, | ||
/** | ||
* Tasks are restarted on worker failure after the termination grace period is elapsed. | ||
* This strategy is used to limit the risk of task duplication. | ||
*/ | ||
AFTER_TERMINATION_GRACE_PERIOD; | ||
|
||
/** | ||
* Checks whether tasks are restartable for that strategy. | ||
* | ||
* @return {@code true} if tasks are restartable. | ||
*/ | ||
public boolean isRestartable() { | ||
return this.equals(IMMEDIATELY) || this.equals(AFTER_TERMINATION_GRACE_PERIOD); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.