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

Add a schedule-aware repeat #57

Open
rucek opened this issue Dec 4, 2023 · 1 comment
Open

Add a schedule-aware repeat #57

rucek opened this issue Dec 4, 2023 · 1 comment
Labels
enhancement New feature or request retries

Comments

@rucek
Copy link
Contributor

rucek commented Dec 4, 2023

While the retry mechanism allows for repeating an operation - according to a Schedule in case of error, we'd also like to have a schedule-aware repeat, which would run an operation according to a Schedule or perhaps until a stop condition is met.

Some things to consider:

  • what happens if the operation fails before the scheduled number of repetitions? Maybe this could be expressed with a multi-policy (see: Add multi-policies for retries #55) that combines repeat and retry?
  • perhaps the stop condition could be thought of yet another Schedule like UntilResult[T](p: T => Boolean) or Until(p: => Boolean), or both?
@rucek rucek added enhancement New feature or request retries labels Dec 4, 2023
@adamw
Copy link
Member

adamw commented Apr 18, 2024

Some operations that we'd like to have:

  • schedule at fixed rate
  • schedule with an initial delay

Should we measure time between start of each operation (start2-start1), or the pause between operation invocations (start2-end1)? Or maybe this should be configurable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request retries
Projects
None yet
Development

No branches or pull requests

2 participants