Add --exit-with-highest-exit-code and --as-job-runner#39
Open
danieroux wants to merge 2 commits intoDarthSim:masterfrom
Open
Add --exit-with-highest-exit-code and --as-job-runner#39danieroux wants to merge 2 commits intoDarthSim:masterfrom
--exit-with-highest-exit-code and --as-job-runner#39danieroux wants to merge 2 commits intoDarthSim:masterfrom
Conversation
…hest exit code of any processes This allows for process failures to bubble up to the shell. Example: ```console $ hivemind --exit-with-highest-exit-code - <<PROCFILE job1: echo "job1 is running"; sleep 0.5; echo "Failing"; exit 13 job2: echo "job2 is running"; sleep 1; echo "Will never complete"; exit 11 PROCFILE job2 | Running... job1 | Running... job2 | job2 is running job1 | job1 is running job1 | Failing job1 | exit status 13 job2 | Interrupting... job2 | signal: interrupt At least one process failed $ echo "Hivemind exited with: $?" Hivemind exited with: 13 ```
…t gracefully, and wait for all to complete See `test-as-job-runner.sh` and: Example: ```shellsession hivemind --as-job-runner --exit-with-highest-exit-code - <<PROCFILE job1: echo "job1 is running"; sleep 0.5; echo "Done" job2: echo "job2 is running"; sleep 1; echo "Done" PROCFILE hivemind --as-job-runner --exit-with-highest-exit-code - <<PROCFILE job1: echo "job1 is running"; sleep 0.5; echo "Fail"; exit 13 job2: echo "job2 is running"; sleep 1; echo "Done" PROCFILE ```
--exit-with-highest-exit-code --exit-with-highest-exit-code and --as-job-runner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--exit-with-highest-exit-codeexitshivemindwith the highest exit code of all processes, which allows for process failures to bubble up to the shell.This is different from #30 - this PR does not change current hivemind behaviour.
Closes #27
Example:
--as-job-runnerchanges hivemind from process control to letting jobs run to completion. Example: