-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add a Twisted handler #69
Conversation
Thanks @juggernaut ! We'll review and get this merged. |
self.remaining -= len(chunk) | ||
|
||
def connectionLost(self, reason): | ||
self.finished.callback(self.response) |
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.
Since Rollbar requires an HTTPS connection, I would add in the following check for OpenSSL:
try:
# Verify we can make HTTPS requests with Twisted.
# From http://twistedmatrix.com/documents/12.0.0/core/howto/ssl.html
from OpenSSL import SSL
except ImportError:
log.exception('Rollbar requires SSL to work with Twisted')
raise
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.
Good catch, done.
Thanks for the review @coryvirok . I've made changes per your feedback. |
LGTM. Thanks! |
FYI - @juggernaut I found a couple of issues while doing more thorough tests for this. Changes here: #71 |
thanks for fixing those @coryvirok |
We have a couple of twisted services we want to report to rollbar. I figured it'd be useful to contribute if others are interested. It's cleaner to use twisted's async client instead of using the default 'thread' handler. I have modeled this after the Tornado handler. Please review. Thanks!