Added the timeout to the DSN (thanks @mgedmin)
This commit is contained in:
parent
fa704c2455
commit
6c143500ab
|
@ -9,7 +9,7 @@ from __future__ import absolute_import
|
|||
|
||||
import logging
|
||||
import sys
|
||||
from raven.utils import compat
|
||||
from raven.utils import compat, six
|
||||
|
||||
try:
|
||||
# Google App Engine blacklists parts of the socket module, this will prevent
|
||||
|
@ -183,6 +183,8 @@ class HTTPTransport(Transport):
|
|||
|
||||
self._parsed_url = parsed_url
|
||||
self._url = parsed_url.geturl()
|
||||
if isinstance(timeout, six.string_types):
|
||||
timeout = int(timeout)
|
||||
self.timeout = timeout
|
||||
|
||||
def send(self, data, headers):
|
||||
|
@ -215,6 +217,8 @@ class HTTPTransport(Transport):
|
|||
|
||||
server = '%s://%s%s/api/%s/store/' % (
|
||||
url.scheme, netloc, path, project)
|
||||
if url.query:
|
||||
server += '?%s' % url.query
|
||||
scope.update({
|
||||
'SENTRY_SERVERS': [server],
|
||||
'SENTRY_PROJECT': project,
|
||||
|
|
|
@ -55,6 +55,8 @@ class TransportRegistry(object):
|
|||
options = dict(q.split('=', 1) for q in parsed_url.query.split('&'))
|
||||
else:
|
||||
options = dict()
|
||||
# Remove the options from the parsed_url
|
||||
parsed_url = urlparse.urlparse(full_url.split('?')[0])
|
||||
self._transports[full_url] = self._schemes[parsed_url.scheme](parsed_url, **options)
|
||||
return self._transports[full_url]
|
||||
|
||||
|
|
Loading…
Reference in New Issue