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

Does not seem to respect --set ON_ERROR_STOP=1 #6

Open
harrybiddle opened this issue Dec 16, 2021 · 1 comment
Open

Does not seem to respect --set ON_ERROR_STOP=1 #6

harrybiddle opened this issue Dec 16, 2021 · 1 comment

Comments

@harrybiddle
Copy link
Contributor

I'm invoking par_psql with --set ON_ERROR_STOP=1.

However, when one of my (parallelised) commands errored, par_psql continued on with the rest of the script.

I'll dig into it, but please let me know if you find a solution to this!

@gbb
Copy link
Owner

gbb commented Dec 16, 2021 via email

breunigs added a commit to breunigs/par_psql that referenced this issue Mar 24, 2023
The sub-shells exit code wasn't checked, so even if psql exited with
a non-zero status code, par_psql would continue. We can check this
directly for sequential queries, but need to do some housekeeping
for the background processes.

It is possible to exit immediately upon encountering a failed
sub-shell, but the later ones might still be running and print
into the terminal, leaving a dirty prompt.

The exit code `3` is what `psql -v ON_ERROR_STOP=1` returns.
breunigs added a commit to breunigs/par_psql that referenced this issue Mar 24, 2023
The sub-shells exit code wasn't checked, so even if psql exited with
a non-zero status code, par_psql would continue. We can check this
directly for sequential queries, but need to do some housekeeping
for the background processes.

It is possible to exit immediately upon encountering a failed
sub-shell, but the later ones might still be running and print
into the terminal, leaving a dirty prompt.

The exit code `3` is what `psql -v ON_ERROR_STOP=1` returns.
breunigs added a commit to breunigs/par_psql that referenced this issue Mar 24, 2023
The sub-shells exit code wasn't checked, so even if psql exited with
a non-zero status code, par_psql would continue. We can check this
directly for sequential queries, but need to do some housekeeping
for the background processes.

It is possible to exit immediately upon encountering a failed
sub-shell, but the later ones might still be running and print
into the terminal, leaving a dirty prompt.

The exit code `3` is what `psql -v ON_ERROR_STOP=1` returns.
breunigs added a commit to breunigs/par_psql that referenced this issue Mar 24, 2023
The sub-shells exit code wasn't checked, so even if psql exited with
a non-zero status code, par_psql would continue. We can check this
directly for sequential queries, but need to do some housekeeping
for the background processes.

It is possible to exit immediately upon encountering a failed
sub-shell, but the later ones might still be running and print
into the terminal, leaving a dirty prompt.

The exit code `3` is what `psql -v ON_ERROR_STOP=1` returns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants