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
How to read results in ThreadingGroup during partial failures? #1756
Comments
Hey @shadyabhi , Not sure if you are trying to catch a specific exception or if you just want to catch all exceptions happening in separate threads. I think the ThreadingGroup object already passes around exception objects using queues and raises if any are encountered during execution. I was able to see stack traces using the following code snippet:
On the command-line I ran: |
Hi @bossjones, Thanks for replying. However, I'm not using the fab command but rather executing all this by using fabric as a library. So, an answer is still pending and would be appreciated. In other words, Thanks |
Hi everyone, I'm sorry, I overlooked the details. Checked out the fabric code and got details. The argument with GroupException is a dictionary with the key as
|
Hello, In addition of shadyabhi's comment, here is a way I use to deal with GroupException.
(got if from ActivCloud support ) |
Thanks @akiuni for your example! I'm new to Python/Fabric and that helped me understand how to make requests using ThreadedGroup, and collect the results when there was an exception. Here's my expanded version of your example. Much appreciated! For what it's worth, I posted this to Stackoverflow as well.
|
Thanks - the documentation is lacking examples like this. for c, r in e.result.items(): |
It will be good to include example of that in docs too. Let's suppose I have this code.
Let's suppose that web1 and web3 succeeded while web2 failed to connect or the command returned with non-zero exit code.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: