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

Support start delay in continue-as-new options #6834

Open
raymondji opened this issue Nov 16, 2024 · 0 comments
Open

Support start delay in continue-as-new options #6834

raymondji opened this issue Nov 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@raymondji
Copy link

raymondji commented Nov 16, 2024

Is your feature request related to a problem? Please describe.
The same as temporalio/features#515: "The use case here is to prevent from having to put a long timer (months) at the top of a workflow and force maintaining history compatibility for as long as that workflow lives."

Workflows that implement some type of loop-with-sleep pattern could benefit from this feature. Currently they would need to be long lived workflows (with the accompanying history compatibility constraints), but adding a start delay to continue-as-new options would allow them to be represented as a series of short-lived workflows.

More generally, any workflow that needs to perform work after sleeping could potentially be rewritten in a "recursive" way using this feature. They would then benefit from being a short-lived workflow and e.g. could better take advantage of worker versioning.

Describe the solution you'd like
Support start delay in continue-as-new options.

Describe alternatives you've considered
The alternatives today are:

  • Sleep within the workflow, but this requires you to maintain history compatibility for the duration of the sleep
  • Start a new workflow within an activity, but that loses the parent-child relationship and history.

Additional context
https://restate.dev/blog/code-that-sleeps-for-a-month/#control-loops describes a similar approach for a different durable execution tool.

@raymondji raymondji added the enhancement New feature or request label Nov 16, 2024
@raymondji raymondji changed the title Expose start delay in continue-as-new options Support start delay in continue-as-new options Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant