
    Hcg8	                         d dl Z d dlmZ e j                  r
d dlZd dlmZ ddZ	 dddd	ed
ede j                  dgdf   fdZ
y)    N)_utils)RetryCallStater   returnc                      y)z'Before call strategy that does nothing.N )retry_states    P/var/www/html/bid-api/venv/lib/python3.12/site-packages/tenacity/before_sleep.pybefore_sleep_nothingr
      s        loggerzlogging.Logger	log_levelexc_infoc                      d fd}|S )z:Before call strategy that logs to some logger the attempt.c                 >   | j                   t        d      | j                  t        d      | j                   j                  rW| j                   j	                         }d|j
                  j                   d| }}r| j                   j	                         }n!d}nd| j                   j                         }}d}| j                  d}nt        j                  | j                        }j                  d| d	| j                  j                   d
| d| d	|       y )Nz&log_it() called before outcome was setz*log_it() called before next_action was setraisedz: Freturnedz	<unknown>z	Retrying z in z seconds as it  .)r   )outcomeRuntimeErrornext_actionfailed	exception	__class____name__resultfnr   get_callback_namelogsleep)	r   exverbvaluelocal_exc_infofn_namer   r   r   s	         r	   log_itz before_sleep_log.<locals>.log_it&   s    &GHH""*KLL%%$$..0B"r||'<'<&=Rt$D%D!,!4!4!>!>!@!&$k&9&9&@&@&B%D"N>>!!G..{~~>G

y !))//0vQugQP#	 	 	
r   r   r   r   Nr   )r   r   r   r&   s   ``` r	   before_sleep_logr(      s     
D Mr   r'   )F)typingtenacityr   TYPE_CHECKINGloggingr   r
   intboolCallabler(   r   r   r	   <module>r0      sa   "  	'2 ))) ) __&'-.	)r   