-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Async client added #62
Conversation
This looks great! Does this work at all in synchronous servers like Apache? |
Yes, it does work properly, the only problem is that these commits don't include a way to terminate message sending thread when the main thread was terminated. |
Wait a minute, you wanted to ask about not-reentrant client code like CGI? Then, it has a chance to exit before sending a single error message. But I use sys.excepthook + create_from_exception for that case. |
Ah, you must be speaking about Apache mpm_prefork... I'm using it on lighttpd+FastCGI and custom API servers only now. |
I'm actually not too familiar w/ hanging threads for such purposes which is why I was curious :) |
Hey there, Soon after the new GitHub Merge Button feature was released today we discovered a bug in the merge procedure in certain cases. This pull request was affected by the bug, causing code to not actually get merged even though it looks from the history as though it was. To bring the master branch back to its expected state, commit this diff of changes that were missed by the merge: diff --git a/sentry/client/base.py b/sentry/client/base.py
index 6663561..5789271 100644
--- a/sentry/client/base.py
+++ b/sentry/client/base.py
@@ -127,6 +127,9 @@ class SentryClient(object):
return message_id
+ def send_remote(self, url=None, data=None):
+ return urlread(url, post=data, timeout=conf.REMOTE_TIMEOUT)
+
def send(self, **kwargs):
"Sends the message to the server."
if conf.REMOTE_URL:
@@ -137,7 +140,7 @@ class SentryClient(object):
'key': conf.KEY,
}
try:
- urlread(url, post=data, timeout=conf.REMOTE_TIMEOUT)
+ self.send_remote(url=url, data=data)
except urllib2.HTTPError, e:
body = e.read()
logger.error('Unable to reach Sentry log server: %s (url: %%s, body: %%s)' % (e,), url, body, Sorry for the inconvenience. If you have any questions or need help, do not hesitate to contact support. |
=)