-
Notifications
You must be signed in to change notification settings - Fork 35
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
A mechanism to only clean source snapshots if send was successful. #48
Comments
Good point. My reasoning was that whenever there is no crash pyznap should just return 0. Though it would make sense to return a nonzero error code if there was some error during snap/send. I'll try to implement this at some point. |
Just found this wonderful tool. Just want to say "thanks!" and toss my vote in for something like this. Would make it that much easier to use long term! |
+1 to this idea. |
+1 to this idea too. I have never written python, but looks like send returns the error, but _main ignores it? |
I was a bit inconsistent with returncodes and how they are propagated from the different functions, I'll have to clean this up at some point. |
Firstly, thank you for writing and maintaining
pyznap
, it's a great tool.pyznap
appears to return0
even if there was some sort of error sending snapshots, meaning:pysnap send && pyznap snap --clean
won't do anything useful.
I'd like to avoid getting into the situation where some failure of the transfer process inadvertently leads to all the common source snapshots being cleaned (something I experienced previously with
znapzend
).Might it be possible to make
pyznap
continue to attempt all operations, even if one fails, but then to return an error code if any operations failed? The error code could even be a count of how many operations failed.This would obviously make manually sending an email on failure easier too, and any other sort of automation that might wrap calling
pyznap
in a script.Cheers.
The text was updated successfully, but these errors were encountered: