<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
U
    \                     @   sx   d dl mZ d dlZd dlmZ d dlmZ d dlmZm	Z	 d dl
mZ d dlmZ G dd	 d	eZd
d Zdd ZdS )    )absolute_importN)Hub)Integration)capture_internal_exceptionsevent_from_exception)JobTimeoutException)Workerc                   @   s   e Zd ZdZedd ZdS )RqIntegrationrqc                     s4   t jfdd} | t _t j  fdd}|t _d S )Nc              	      s   t j}|t}|d kr* | |f||S | 4}|  |tt	|  | |f||}W 5 Q R X | j
r||j  |S N)r   currentget_integrationr	   Z
push_scopeZclear_breadcrumbsZadd_event_processor_make_event_processorweakrefrefZis_horseclientflush)selfjobargskwargshubZintegrationZscoperv)old_perform_job K/opt/alt/python38/lib/python3.8/site-packages/sentry_sdk/integrations/rq.pysentry_patched_perform_job    s    


z<RqIntegration.setup_once.<locals>.sentry_patched_perform_jobc                    s   t |  | |f||S r   )_capture_exception)r   r   exc_infor   )old_handle_exceptionr   r   sentry_patched_handle_exception9   s    zARqIntegration.setup_once.<locals>.sentry_patched_handle_exception)r   Zperform_jobZhandle_exception)r   r    r   )r   r   r   
setup_once   s    zRqIntegration.setup_onceN)__name__
__module____qualname__
identifierstaticmethodr!   r   r   r   r   r	      s   r	   c                    s    fdd}|S )Nc              	      s     }|d k	rft   |j| d< W 5 Q R X t  0 | di }|j|j|j|j|jd|d< W 5 Q R X d|krt  ( t|d d trdd|jg| d	< W 5 Q R X | S )
NZtransactionextra)Zjob_idfuncr   r   descriptionzrq-jobr   r   r
   r   Zfingerprint)	r   	func_name
setdefaultidr   r   r)   
issubclassr   )eventhintr   r'   weak_jobr   r   event_processorB   s"    z._make_event_processor.<locals>.event_processorr   )r1   r2   r   r0   r   r   @   s    r   c                 K   sF   t j}|td krd S t| |jjdddd\}}|j||d d S )Nr
   F)typeZhandled)Zclient_optionsZ	mechanism)r/   )r   r   r   r	   r   r   optionsZcapture_event)r   r   r   r.   r/   r   r   r   r   ]   s    
r   )
__future__r   r   Zsentry_sdk.hubr   Zsentry_sdk.integrationsr   Zsentry_sdk.utilsr   r   Zrq.timeoutsr   Z	rq.workerr   ZAnyDictCallableZJobZQueueZExcInfor	   r   r   r   r   r   r   <module>   s   )