a
    ŠxdŽ  ã                   @   sp   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 e	r\d dl
mZ d dlmZmZ G dd	„ d	eƒZd
S )é    )ÚHub)Ú
ContextVar)ÚIntegration©Úadd_global_event_processor)ÚMYPY)ÚOptional)ÚEventÚHintc                   @   s$   e Zd ZdZdd„ Zedd„ ƒZdS )ÚDedupeIntegrationZdedupec                 C   s   t dƒ| _d S )Nz	last-seen)r   Ú
_last_seen)Úself© r   úV/var/www/html/Ranjet/env/lib/python3.9/site-packages/sentry_sdk/integrations/dedupe.pyÚ__init__   s    zDedupeIntegration.__init__c                  C   s   t dd„ ƒ} d S )Nc                 S   sh   |d u r| S t j t¡}|d u r$| S | dd ¡}|d u r<| S |d }|j d ¡|u rXd S |j |¡ | S )NÚexc_infoé   )r   ÚcurrentZget_integrationr   Úgetr   Úset)ÚeventÚhintZintegrationr   Úexcr   r   r   Ú	processor   s    z/DedupeIntegration.setup_once.<locals>.processorr   )r   r   r   r   Ú
setup_once   s    zDedupeIntegration.setup_onceN)Ú__name__Ú
__module__Ú__qualname__Ú
identifierr   Ústaticmethodr   r   r   r   r   r      s   r   N)Zsentry_sdk.hubr   Zsentry_sdk.utilsr   Zsentry_sdk.integrationsr   Zsentry_sdk.scoper   Zsentry_sdk._typesr   Útypingr   r	   r
   r   r   r   r   r   Ú<module>   s   