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

Feature Request: Exponential backoff #265

Closed
mscottnelson opened this issue Mar 8, 2021 · 3 comments · Fixed by #462
Closed

Feature Request: Exponential backoff #265

mscottnelson opened this issue Mar 8, 2021 · 3 comments · Fixed by #462

Comments

@mscottnelson
Copy link

Would be nice to have an exponential backoff feature when a process fails and you would like to restart it, but then allow that exponential backoff to be reset when the process is "alive" for a certain amount of time. As a start, this could even be simply allowing restartDelay option to take a function instead of a number.

Example:

  • process fails -> immediate restart
  • process fails -> restart after 2 seconds
  • process fails -> restart after 4 seconds
  • process fails -> restart after 8 seconds
  • process "succeeds", where "success" is defined as "did not exit for 60 seconds after starting"
  • process fails -> immediate restart
  • process fails -> restart after 2 seconds
@gustavohenke
Copy link
Member

Hey @mscottnelson! This sounds like a nice feature indeed.
Making --restart-after accept exponential as a special keyword would be nice.

@mscottnelson
Copy link
Author

I see about putting together a pull request sometime this month.

@gustavohenke
Copy link
Member

🚢 This is now available in v9.0.0!
https://github.com/open-cli-tools/concurrently/releases/tag/v9.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants