ok

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/raven/transport/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/raven/transport/__pycache__/gevent.cpython-37.pyc

B

��Yz�@s�dZddlmZddlmZddlmZyBddlZyddlm	Z	Wn e
k
rbddlm	Z	YnXdZWne
k
r�dZYnXGdd	�d	ee�Z
dS)
z�
raven.transport.gevent
~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
�)�absolute_import)�AsyncTransport)�
HTTPTransportN)�	SemaphoreTcs:eZdZddgZd
�fdd�	Z�fdd�Zdd	�Z�ZS)�GeventedHTTPTransportzgevent+httpzgevent+https�dcs,tstd��t|�|_tt|�j||�dS)Nz&GeventedHTTPTransport requires gevent.)�
has_gevent�ImportErrorr�_lock�superr�__init__)�selfZmaximum_outstanding_requests�args�kwargs)�	__class__��G/opt/alt/python37/lib/python3.7/site-packages/raven/transport/gevent.pyrs
zGeventedHTTPTransport.__init__cs4�j��t�tt��j|||�����fdd��S)z?
        Spawn an async request to a remote webserver.
        cs��|���S)N)�_done)�x)�
failure_cbr
�
success_cbrr�<lambda>.�z2GeventedHTTPTransport.async_send.<locals>.<lambda>)r
�acquire�geventZspawnrr�send�link)r
Zurl�dataZheadersrr)r)rr
rr�
async_send%s
z GeventedHTTPTransport.async_sendcGs(|j��|��r|�n
||j�dS)N)r
�releaseZ
successfulZ	exception)r
Zgreenletrrrrrrr0s
zGeventedHTTPTransport._done)r)�__name__�
__module__�__qualname__Zschemerrr�
__classcell__rr)rrrsr)�__doc__Z
__future__rZraven.transport.baserZraven.transport.httprrZgevent.lockrr	Zgevent.corosrrrrrr�<module>s


Zerion Mini Shell 1.0