-
Notifications
You must be signed in to change notification settings - Fork 263
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
Handle retry attempts better: print exception and stack trace #1555
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
I've made the changes, thanks @yifanmai for sharing the way to print the rror. Works fine now. |
# The lock is used to prevent multiple threads from printing at the same time. | ||
# This can cause issues when printing the stack trace. | ||
# (The stack traces can get mixed up and become unreadable.) | ||
print_lock: threading.Lock = threading.Lock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is okay, but note: the stack trace logging may still be interleaved with other logging, and this is expected behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I know, it's just so that there a not 2 stacks traces at the same time
Solving #1471
I tried also to handle KeyboardInterrupt but is is not super consistent.