-
Notifications
You must be signed in to change notification settings - Fork 22
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
Exception in poll causes crash of entire instance #1064
Comments
Behaviour with a try/except added:
or and with debug logging, it gives the details:
|
close... but not quite right... for the other plugins, when debug is enabled, we don't try/except... because people want it to crash with maximum info. so you need an if to execute without try/except wrapper when debug is on. That would be consistent with the other entry points. It's also weird that it isn't it's own _runCallbackPoll() would be the more natural way to arrange things... |
oh yeah, I didn't notice the I'm pretty sure this code was only recently moved into flow/init.py. It used to be in flow/poll.py. |
ok, I added to the same branch:
maybe try it out. |
If there's an unhandled exception in a poll, it causes the entire instance to crash.
Obviously it would be ideal if people writing poll plugins handled all exceptions, but imo we should deal with cases where people don't. Many times these exceptions are temporary (network issues, etc.) and won't happen again if the poll runs again. Right now, the whole process crashes and if we're lucky, sr3 sanity will restart it.
I think this section should be wrapped in a try/except:
sarracenia/sarracenia/flow/__init__.py
Lines 1039 to 1043 in 6ad476d
We have a try/except for other callbacks, so a poll should be the same.
Current Behaviour:
The entire instance crashes.
The text was updated successfully, but these errors were encountered: