open-cli-tools / concurrently

Run commands concurrently. Like `npm run watch-js & npm run watch-less` but better.
https://www.npmjs.com/package/concurrently
MIT License
6.98k stars 227 forks source link

Exponential back-off for process restarting #462

Closed gustavohenke closed 7 months ago

gustavohenke commented 7 months ago

Title.

$ conc --restart-tries 4 --restart-after exponential "date && exit 1"
[0] Fri 12 Jan 2024 14:10:56 -03
[0] date && exit 1 exited with code 1
[0] date && exit 1 restarted
[0] Fri 12 Jan 2024 14:10:57 -03
[0] date && exit 1 exited with code 1
[0] date && exit 1 restarted
[0] Fri 12 Jan 2024 14:10:59 -03
[0] date && exit 1 exited with code 1
[0] date && exit 1 restarted
[0] Fri 12 Jan 2024 14:11:03 -03
[0] date && exit 1 exited with code 1
[0] date && exit 1 restarted
[0] Fri 12 Jan 2024 14:11:11 -03
[0] date && exit 1 exited with code 1

Closes #265

coveralls commented 7 months ago

Coverage Status

coverage: 99.322% (+0.006%) from 99.316% when pulling 597a1f80cf160b8e7a1f6ab6926c44cb43793fca on exponential-backoff into aedebc1c6947302351d9d0e0f2333a291068718c on main.

mscottnelson commented 7 months ago

Very nice! Looks great! Thank you for adding this feature