Ë
    õ�Djt  ã                   ó€   — 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y)
é    N)Úlogger)ÚIntegration)ÚTYPE_CHECKING)ÚAny)ÚOptionalc                 óº   — d„ } |d| z  «        |d|z  «        |dt         j                  dk(  xr dxs dz  «       t        j                  j	                  «        y)	zÛThis 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   — t         j                  j                  | dz   «       y )Nú
)ÚsysÚstderrÚwrite)Úmsgs    úbC:\Crop_Prediction\Backend\crop-ai-system\venv\Lib\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      sU   € ò%ñ 	Ð	9¸GÑ	CÔDÙÐ	# gÑ	-Ô.ÙÐ	 ¤B§G¡G¨t¡OÒ$?¸Ò$FÀ3Ñ	GÔHÜ‡J�J×ÑÕr   c                   ó(   — e Zd ZdZdd„Zed„ «       Zy)ÚAtexitIntegrationÚatexitNc                 ó"   — |€t         }|| _        y ©N)r   Úcallback)Úselfr    s     r   Ú__init__zAtexitIntegration.__init__#   s   € àÐÜ'ˆHØ ˆ�r   c                  ó0   — t         j                  d„ «       } y )Nc                  ó,  — t        j                  «       } | j                  t        «      }|€y t	        j
                  d«       t	        j
                  d«       t        j                  «       j                  «        | j                  |j                  ¬«       y )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,   so   € ô  ×*Ñ*Ó,ˆFØ ×0Ñ0Ô1BÓCˆKàÐ"Øä�L‰LÐ6Ô7Ü�L‰LÐ7Ô8Ü×*Ñ*Ó,×8Ñ8Ô:à�L‰L +×"6Ñ"6ˆLÕ7r   )r   Úregister)r.   s    r   Ú
setup_oncezAtexitIntegration.setup_once)   s   € ô 
�‰ñ	8ó 
ñ	8r   r   )Ú__name__Ú
__module__Ú__qualname__Ú
identifierr"   Ústaticmethodr0   © r   r   r   r       s    „ Ø€Jó!ð ñ8ó ñ8r   r   )r   r   r   r%   Úsentry_sdk.utilsr   Úsentry_sdk.integrationsr   Útypingr   r   r   r   r   r6   r   r   ú<module>r:      s4   ðÛ 	Û 
Û ã Ý #Ý /Ý  áÝÝòô"8˜õ 8r   