관리-도구
편집 파일: threaded.pyc
� ��Yc @@ s� d Z d d l m Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z d d l m Z d d l m Z d d l m Z m Z d Z e j d � Z d e f d � � YZ d e e f d � � YZ d S( s� raven.transport.threaded ~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. i ( t absolute_importN( t sleept time( t AsyncTransport( t HTTPTransport( t Queuet check_threadsi s sentry.errorst AsyncWorkerc B@ sh e Z e � Z e d � Z d � Z d � Z d � Z d � Z d � Z d d � Z d � Z d � Z RS( c C@ sU t � t d � | _ t j � | _ d | _ d | _ i | d 6| _ | j � d S( Ni����t shutdown_timeout( R R t _queuet threadingt Lockt _lockt Nonet _threadt _thread_for_pidt optionst start( t selfR ( ( sI /opt/alt/python27/lib/python2.7/site-packages/raven/transport/threaded.pyt __init__ s c C@ s/ | j t j � k r t S| j o. | j j � S( N( R t ost getpidt FalseR t is_alive( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/raven/transport/threaded.pyR ( s c C@ s | j � r d S| j � d S( N( R R ( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/raven/transport/threaded.pyt _ensure_thread- s c C@ s� | j j � z� | j � s d S| j j | j � | j d } t d | � } | j | � s� | j j � } d | GHd | GHt j d k r� d GHn d GH| j | | � n d | _ Wd | j j � Xd S( NR g�������?s6 Sentry is attempting to send %i pending error messagess Waiting up to %s secondst nts Press Ctrl-Break to quits Press Ctrl-C to quit( R t acquireR R t put_nowaitt _terminatorR t mint _timed_queue_joint qsizeR t nameR R t release( R t timeoutt initial_timeoutt size( ( sI /opt/alt/python27/lib/python2.7/site-packages/raven/transport/threaded.pyt main_thread_terminated2 s$ c C@ s� t � | } | j } | j j � zH x= | j re | t � } | d k rO t S| j j d | � q) Wt SWd | j j � Xd S( s� implementation of Queue.join which takes a 'timeout' argument returns true on success, false on timeout i R"