o
    Bi                     @  sT   d dl mZ d dlZd dlZd dlmZ d dlmZmZm	Z	 e	dZ
ddddZdS )    )annotationsNwraps)Callable	AwaitableTypeVarT   ffffff?       @attemptsintbase_delay_sfloatmax_delay_sc                   s   d fdd}|S )NfnCallable[..., Awaitable[T]]c                   s    t  d fdd}|S )Nreturnr   c                    s   d }t  D ]<}z| i |I d H W   S  tyC } z!|}td|  dt d   }t|I d H  W Y d }~qd }~ww |)N   r
   g333333?)range	Exceptionminrandomasynciosleep)argskwargslastiedelay)r   r   r   r    5/var/www/www-root/data/www/77.83.87.30/utils/retry.pywrapper
   s   "z*async_retry.<locals>.deco.<locals>.wrapper)r   r   r   )r   r#   r   r   r   )r   r"   deco	   s   
zasync_retry.<locals>.deco)r   r   r!   )r   r   r   r%   r!   r$   r"   async_retry   s   r&   )r	   r
   r   )r   r   r   r   r   r   )
__future__r   r   r   	functoolsr   typingr   r   r   r   r&   r!   r!   r!   r"   <module>   s    