-
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.
feat(core): add a delay on Pause task in order to restart automatical…
- Loading branch information
1 parent
a481bdd
commit b2b0bbf
Showing
14 changed files
with
358 additions
and
46 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
22 changes: 22 additions & 0 deletions
22
core/src/main/java/io/kestra/core/runners/ExecutionDelay.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,22 @@ | ||
package io.kestra.core.runners; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Value; | ||
|
||
import java.time.Instant; | ||
import javax.validation.constraints.NotNull; | ||
|
||
@Value | ||
@AllArgsConstructor | ||
@Builder | ||
public class ExecutionDelay { | ||
@NotNull | ||
String taskRunId; | ||
|
||
@NotNull | ||
String executionId; | ||
|
||
@NotNull | ||
Instant date; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
id: pause-delay | ||
namespace: io.kestra.tests | ||
|
||
tasks: | ||
- id: pause | ||
type: io.kestra.core.tasks.flows.Pause | ||
delay: PT1S | ||
tasks: | ||
- id: ko | ||
type: io.kestra.core.tasks.scripts.Bash | ||
commands: | ||
- echo "trigger 1 seconds pause" | ||
- id: last | ||
type: io.kestra.core.tasks.debugs.Return | ||
format: "{{task.id}} > {{taskrun.startDate}}" |
Oops, something went wrong.