Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger a flow after some delay #542

Closed
tchiotludo opened this issue Apr 6, 2022 · 4 comments · Fixed by #549
Closed

Trigger a flow after some delay #542

tchiotludo opened this issue Apr 6, 2022 · 4 comments · Fixed by #549
Labels
area/backend Needs backend code changes

Comments

@tchiotludo
Copy link
Member

on Flow, a nice feature will be allow to trigger the flow after xx minutes / seconds / hour.
When the flow is trigger, instead of sending directly to the Queue, just keep it on a Kafka State store and use punctuate to send it later

@tchiotludo tchiotludo added enhancement area/backend Needs backend code changes labels Apr 6, 2022
@tchiotludo tchiotludo moved this to Backlog in All issues Apr 6, 2022
@sahmed007
Copy link

Hi, I'm interested in this project and would like to work on this. Can you please provide some guidance on where to start with this task?

@tchiotludo
Copy link
Member Author

Just need to think a little more.
My last thought was to use the Pause task and add a delay parameter that will let the flow in PAUSE state, wait the delay, and continue after.
For the User design, it will be cool, the flow will be clearly show as pause on the UI.

For the technical point, do you have background on Java & Kafka Streams ?

@tchiotludo
Copy link
Member Author

I've try a first look and first implementation, not so easy than I think and need to well know the application architecture in order to work on it
Will keep you informed

tchiotludo added a commit that referenced this issue Apr 10, 2022
tchiotludo added a commit that referenced this issue Apr 10, 2022
tchiotludo added a commit that referenced this issue Apr 10, 2022
Repository owner moved this from Backlog to Done in All issues Apr 10, 2022
tchiotludo added a commit that referenced this issue Apr 11, 2022
tchiotludo added a commit that referenced this issue Apr 11, 2022
tchiotludo added a commit that referenced this issue Apr 11, 2022
@tchiotludo
Copy link
Member Author

@sahmed007: it's available on latest dev image
Here is an example :

id: pause-delay
namespace: io.kestra.tests

tasks:
  - id: pause
    type: io.kestra.core.tasks.flows.Pause
    delay: PT5S
    tasks:
      - id: ko
        type: io.kestra.core.tasks.scripts.Bash
        commands:
          - echo "trigger 5 seconds pause"

  - id: last
    type: io.kestra.core.tasks.debugs.Return
    format: "{{task.id}} > {{taskrun.startDate}}"
2022-04-11T11-53-39D0-12.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend Needs backend code changes
Projects
No open projects
Archived in project
2 participants