U \@sdddlmZddlZddlZddlZddlmZddlmZddl m Z ddZ Gdd d e ZdS) )absolute_importN)Hub)logger) IntegrationcCsHdd}|d||d||dtjdkr2dp4dtjd 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. cSstj|ddS)N )sysstderrwrite)msgr /atexit.pyechoszdefault_callback..echoz6Sentry is attempting to send %i pending error messageszWaiting up to %s secondszPress Ctrl-%s to quitntZBreakCN)osnamerrflush)ZpendingZtimeoutr r r r default_callbacks   rc@s&eZdZdZdddZeddZdS)AtexitIntegrationatexitNcCs|dkr t}||_dS)N)rcallback)selfrr r r __init__"szAtexitIntegration.__init__cCstjdd}dS)NcSs@tdtj}|t}|dk r._shutdown)rregister)rr r r setup_once(szAtexitIntegration.setup_once)N)__name__ __module__ __qualname__Z identifierr staticmethodrr r r r rs r)Z __future__rrrrZsentry_sdk.hubrZsentry_sdk.utilsrZsentry_sdk.integrationsrZAnyZOptionalrrr r r r s