관리-도구
편집 파일: celery.cpython-311.pyc
� �܋f�J � � � d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z d dl mZ d dlm Z mZ d dlmZ d d lmZmZ d d lmZ d dlmZmZ d dlmZ d d lmZmZmZmZ erQd dl m!Z! d dl m"Z" d dl m#Z# d dl m$Z$ d dl m%Z% d dl m&Z& d dl m'Z' d dl m(Z( d dlm)Z)m*Z*m+Z+m,Z, e'de"de!f �� � Z- d dl.m/Z0 d dl.m1Z1m2Z2 d dl3m4Z4 d dl5m6Z6 d dl7m8Z8m9Z9m:Z:m;Z; d dl<m=Z=m>Z> d d l?m@Z@mAZAmBZB n# eC$ r ed!� � �w xY we:e8e9fZD G d"� d#e� � ZEd$� ZFd%� ZGd&� ZHd'� ZId4d(�ZJd)� ZKd*� ZLd+� ZMd,� ZNd-� ZOd.� ZPd/� ZQd0� ZRd1� ZSd2� ZTd3� ZUdS )5� )�absolute_importN)�continue_trace)�OP)�reraise��wraps)�capture_checkin� MonitorStatus)�Hub)�Integration�DidNotEnable)� ignore_logger)�BAGGAGE_HEADER_NAME�TRANSACTION_SOURCE_TASK)� TYPE_CHECKING)�capture_internal_exceptions�event_from_exception�logger�match_regex_list)�Any)�Callable)�Dict)�List)�Optional)�Tuple)�TypeVar)�Union)�EventProcessor�Event�Hint�ExcInfo�F.)�bound)�VERSION)�Task�Celery)�task_has_custom)� Scheduler)�Ignore�Reject�Retry�SoftTimeLimitExceeded)�crontab�schedule)�task_failure�task_success� task_retryzCelery not installedc �6 � e Zd ZdZ dd�Zed� � � ZdS )�CeleryIntegration�celeryTFNc �p � || _ || _ || _ |rt � � t � � d S d S �N)�propagate_traces�monitor_beat_tasks�exclude_beat_tasks�_patch_beat_apply_entry�_setup_celery_beat_signals)�selfr7 r8 r9 s �U/opt/cloudlinux/venv/lib64/python3.11/site-packages/sentry_sdk/integrations/celery.py�__init__zCeleryIntegration.__init__A sL � � !1���"4���"4���� )�#�%�%�%�&�(�(�(�(�(� )� )� c �( �� t dk rt d� � �dd lmc m} | j ��fd�}|| _ ddlm} t |j � � |_ t � � t d� � t d� � t d� � d S ) N)� zCelery 3 or newer required.r c �( �� t |dd� � sft |d� � r5t |t |� � j � � t |� � _ nt ||j � � |_ d|_ t | �| |g|�R i |��� � S )N�_sentry_is_patchedF�__call__T)�getattrr'