ó
    ùÞ j«  ã                   ó†   • S SK Jr  S SKJrJrJrJrJrJrJ	r	  S SK
JrJrJr  \(       a  S SKJr  \	" S5      r " S S5      rg)	é    )Úsleep)ÚTYPE_CHECKINGÚAnyÚ	AwaitableÚCallableÚTupleÚTypeÚTypeVar)ÚConnectionErrorÚ
RedisErrorÚTimeoutError)ÚAbstractBackoffÚTc            	       óŒ   • \ rS rSrSrSr\\44SSS\S\	\
\   S4   4S	 jjrS
\4S jrS\/ \\   4   S\\/\4   S\4S jrSrg)ÚRetryé   z0Retry a specific number of times after a failure©Ú_backoffÚ_retriesÚ_supported_errorsÚbackoffr   ÚretriesÚsupported_errors.c                 ó(   • Xl         X l        X0l        g)z÷
Initialize a `Retry` object with a `Backoff` object
that retries a maximum of `retries` times.
`retries` can be negative to retry forever.
You can specify the types of supported errors which trigger
a retry with the `supported_errors` parameter.
Nr   )Úselfr   r   r   s       ÚM/var/www/html/gaurav/venv/lib/python3.13/site-packages/redis/asyncio/retry.pyÚ__init__ÚRetry.__init__   s   € ð   ŒØŒØ!1Õó    Úspecified_errorsc                 ób   • [        [        U R                  [        U5      -   5      5      U l        g)z=
Updates the supported errors with the specified error types
N)ÚtupleÚsetr   )r   r    s     r   Úupdate_supported_errorsÚRetry.update_supported_errors&   s*   € ô "'Ü�×&Ñ&¬Ð/?Ó)@Ñ@ÓAó"
ˆÕr   ÚdoÚfailÚreturnc              ƒ   ó~  #   • U R                   R                  5         Sn  U" 5       I Sh  v•N $  N! U R                   av  nUS-  nU" U5      I Sh  v•N    U R                  S:¼  a  X0R                  :”  a  UeU R                   R	                  U5      nUS:”  a  [        U5      I Sh  v•N     SnAOSnAff = fM�  7f)zþ
Execute an operation that might fail and returns its result, or
raise the exception that was thrown depending on the `Backoff` object.
`do`: the operation to call. Expects no argument.
`fail`: the failure handler, expects the last error that was thrown
r   Né   )r   Úresetr   r   Úcomputer   )r   r&   r'   ÚfailuresÚerrorr   s         r   Úcall_with_retryÚRetry.call_with_retry.   s¤   é € ð 	�‰×ÑÔØˆØð	)Ù›T—zÐ!‘zøØ×)Ñ)ó )Ø˜A‘�Ù˜5“k×!Ñ!Ø—=‘= AÓ%¨(·]±]Ó*BØ�KØŸ-™-×/Ñ/°Ó9�Ø˜Q“;Ü ›.×(Ñ(ÿøð)úñ ùsP   ‚B=¡
2 «0¬2 ¯B=°2 ²B8ÁB3ÁAÁAB3Â(B+Â)B3Â.B=Â3B8Â8B=N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r   r   Úintr   r	   r   r   Úlistr$   r   r   r   r   r/   Ú__static_attributes__© r   r   r   r      sŠ   † Ù:à;€Ið Øð:
ñ	2à"ð2ð ð2ð    ZÑ 0°#Ð 5Ñ6õ	2ð(
¸ô 
ð)Ø˜2˜y¨™|Ð+Ñ,ð)Ø4<¸j¸\È3Ð=NÑ4Oð)à	
÷)r   r   N)Úasyncior   Útypingr   r   r   r   r   r	   r
   Úredis.exceptionsr   r   r   Úredis.backoffr   r   r   r:   r   r   Ú<module>r?      s2   ðÝ ß P× PÑ Pç FÑ FæÝ-ñ ˆCƒL€÷6)ò 6)r   