
    fit                         d dl Z d dlZd dlZd dl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 d Z G d d	e          ZdS )
    N)logger)Integration)TYPE_CHECKING)Any)Optionalc                     d } |d| z              |d|z              |dt           j        dk    rdpdz             t          j                                         dS )	zThis is the default shutdown callback that is set on the options.
    It prints out a message to stderr that informs the user that some events
    are still pending and the process is waiting for them to flush out.
    c                 J    t           j                            | dz              d S )N
)sysstderrwrite)msgs    n/var/www/html/Pagina-Ingenieria-Requisitos/venv/lib/python3.11/site-packages/sentry_sdk/integrations/atexit.pyechozdefault_callback.<locals>.echo   s"    
t$$$$$    z.Sentry is attempting to send %i pending eventszWaiting up to %s secondszPress Ctrl-%s to quitntBreakCN)osnamer   r   flush)pendingtimeoutr   s      r   default_callbackr      s    % % % 	D	9G	CDDDD	#g	-...D	 BGtO$?$F3	GHHHJr   c                   0    e Zd ZdZddZed             ZdS )AtexitIntegrationatexitNc                 &    |t           }|| _        d S N)r   callback)selfr    s     r   __init__zAtexitIntegration.__init__#   s    'H r   c                  0    t           j        d             } d S )Nc                  8   t          j                    } |                     t                    }|d S t	          j        d           t	          j        d           t          j                                                     |                     |j	                   d S )Nzatexit: got shutdown signalzatexit: shutting down client)r    )

sentry_sdk
get_clientget_integrationr   r   debugget_isolation_scopeend_sessioncloser    )clientintegrations     r   	_shutdownz/AtexitIntegration.setup_once.<locals>._shutdown,   s      *,,F 001BCCK"L6777L7888*,,88:::LL+"6L77777r   )r   register)r.   s    r   
setup_oncezAtexitIntegration.setup_once)   s)     
	8 	8 
	8 	8 	8r   r   )__name__
__module____qualname__
identifierr"   staticmethodr0    r   r   r   r       sH        J! ! ! ! 8 8 \8 8 8r   r   )r   r   r   r%   sentry_sdk.utilsr   sentry_sdk.integrationsr   typingr   r   r   r   r   r6   r   r   <module>r:      s    				 



      # # # # # # / / / / / /                "8 8 8 8 8 8 8 8 8 8r   