관리-도구
편집 파일: __init__.cpython-311.pyc
� �܋f2 � � � d Z ddlmZ ddlmZ ddlmZ ddlmZm Z ddl m Z ddlm Z G d� d e � � Z G d � de� � ZdS ) z� raven.contrib.tornado ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details :license: BSD, see LICENSE for more details � )�absolute_import)�partial)�ioloop)�AsyncHTTPClient� HTTPError)r )�Clientc �F � � e Zd ZdZ� fd�Zd� Zd d�Zd d�Zd� Zd d�Z � xZ S ) �AsyncSentryClientz� A mixin class that could be used along with request handlers to asynchronously send errors to sentry. The client also captures the information from the request handlers c �~ �� |� dd� � | _ t t | � � j |i |�� d S )N� validate_certT)�popr �superr �__init__)�self�args�kwargs� __class__s ��o/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/raven/contrib/tornado/__init__.pyr zAsyncSentryClient.__init__ sB �� �#�Z�Z���>�>���/����&�&�/��@��@�@�@�@�@� c � � | � � � sdS | j |i |��} | j dd|� dd� � i|��}|d |fS )a Takes the same arguments as the super function in :py:class:`Client` and extracts the keyword argument callback which will be called on asynchronous sending of the request :return: a 32-length string identifying this event N�callback�event_id� )� is_enabled� build_msg�send�get)r r r �data�futures r �capturezAsyncSentryClient.capture sk � � ��� � � ��F��t�~�t�.�v�.�.�����I�I�F�J�J�z�4�$@�$@�I�D�I�I���Z� �&�)�)r Nc �\ � | � |� � }| � |||�� � S )zV Serializes the message and passes the payload onto ``send_encoded``. )�auth_headerr )�encode�send_encoded)r r"