Hacked By AnonymousFox
�
�܋fz � � � d Z ddlmZ ddlmZ ddlmZ ddlZ ddlm Z n# e
$ r ddlm Z Y nw xY wdZn
# e
$ r dZY nw xY w G d� 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)� SemaphoreTc �8 � � e Zd ZddgZd� fd� Z� fd�Zd� Z� xZS )�GeventedHTTPTransportzgevent+httpzgevent+https�d c � �� t st d� � �t |� � | _ t t
| � � j |i |�� d S )Nz&GeventedHTTPTransport requires gevent.)�
has_gevent�ImportErrorr �_lock�superr �__init__)�self�maximum_outstanding_requests�args�kwargs� __class__s ��M/opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/transport/gevent.pyr zGeventedHTTPTransport.__init__ sT �� �� H��F�G�G�G��;�<�<��
�3��#�T�*�*�3�T�D�V�D�D�D�D�D� c �� �� ��� � j � � � t j t t
� � � j |||� � � �� �fd�� � S )z?
Spawn an async request to a remote webserver.
c �2 �� �� | ��� � S �N)�_done)�x�
failure_cbr �
success_cbs ���r �<lambda>z2GeventedHTTPTransport.async_send.<locals>.<lambda>. s �� ����A�z�:�>�>� r )r
�acquire�gevent�spawnr r �send�link)r �url�data�headersr r r s ` ``�r �
async_sendz GeventedHTTPTransport.async_send% se ����� �
�
�������|��'��.�.�3�S�$��
�
�
�$�>�>�>�>�>�>�
?�
?� @r c � � | j � � � |� � � r |� � d S ||j � � d S r )r
�release�
successful� exception)r �greenletr r r s r r zGeventedHTTPTransport._done0 sR � ��
��������� � � +��J�L�L�L�L�L��J�x�)�*�*�*�*�*r )r )�__name__�
__module__�__qualname__�schemer r'