관리-도구
편집 파일: rq.cpython-311.pyc
� �܋f# � �J � d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl m Z mZ d dlm Z d dlmZ d d lmZmZmZmZ d d lmZ d dlmZ d dlmZ d d lmZ n# e$ r e d� � �w xY wd dlm Z e rd dl!m"Z"m#Z#m$Z$ d dlm%Z% d dlm&Z& d dl'm(Z( G d� de� � Z)d� Z*d� Z+dS )� )�absolute_importN)�OP)�continue_trace)�Hub)�DidNotEnable�Integration)� ignore_logger)�TRANSACTION_SOURCE_TASK)�capture_internal_exceptions�event_from_exception�format_timestamp� parse_version)�Queue)�JobTimeoutException)�VERSION)�WorkerzRQ not installed)� TYPE_CHECKING)�Any�Callable�Dict)�EventProcessor)�ExcInfo)�Jobc �( � e Zd ZdZed� � � ZdS )� RqIntegration�rqc �| ���� t t � � } | �'t d� t � � � � �| dk rt d� � �t j ��fd�}|t _ t j ��fd�}|t _ t j ��fd�}|t _ t d� � d S )NzUnparsable RQ version: {})r � zRQ 0.6 or newer is required.c � �� t j }|� t � � }|� � | |g|�R i |��S |j }|�J �|� � � 5 }|� � � |� t t j |� � � � � � t |j � d� � pi t j dt �� � }t# � � 5 |j |_ d d d � � n# 1 swxY w Y |� |d|i�� � 5 � | |g|�R i |��} d d d � � n# 1 swxY w Y d d d � � n# 1 swxY w Y | j r|� � � | S )N�_sentry_trace_headerszunknown RQ task)�op�name�source�rq_job)�custom_sampling_context)r �current�get_integrationr �client� push_scope�clear_breadcrumbs�add_event_processor�_make_event_processor�weakref�refr �meta�getr � QUEUE_TASK_RQr r � func_namer"