
    ght                         S SK r S SKrS SKrS SKrS SKJr  S SKJr  S SKJ	r	  \	(       a  S SKJ
r
  S SKJr  S r " S S	\5      rg)
    N)logger)Integration)TYPE_CHECKING)Any)Optionalc                     S nU" SU -  5        U" SU-  5        U" S[         R                  S:H  =(       a    S=(       d    S-  5        [        R                  R	                  5         g)	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                 H    [         R                  R                  U S-   5        g )N
)sysstderrwrite)msgs    a/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/sentry_sdk/integrations/atexit.pyecho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      sU    % 		9G	CD	#g	-.	 BGGtO$?$F3	GHJJr   c                   2    \ rS rSrSrSS jr\S 5       rSrg)AtexitIntegration    atexitNc                 "    Uc  [         nXl        g N)r   callback)selfr"   s     r   __init__AtexitIntegration.__init__#   s    'H r   c                  0    [         R                  S 5       n g )Nc                  0   [         R                  " 5       n U R                  [        5      nUc  g [        R
                  " S5        [        R
                  " S5        [         R                  " 5       R                  5         U R                  UR                  S9  g )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   	_shutdown/AtexitIntegration.setup_once.<locals>._shutdown,   so      **,F 001BCK"LL67LL78**,88:LL+"6"6L7r   )r   register)r2   s    r   
setup_onceAtexitIntegration.setup_once)   s     
	8 
	8r   r(   r!   )	__name__
__module____qualname____firstlineno__
identifierr$   staticmethodr5   __static_attributes__ r   r   r   r       s     J! 8 8r   r   )r   r   r   r)   sentry_sdk.utilsr   sentry_sdk.integrationsr   typingr   r   r   r   r   r>   r   r   <module>rB      s4    	 
   # /  "8 8r   