Ë
    ·>i  ã                   ó<   — d dl Z d dlmZ d dlmZmZ  G d„ d«      Zy)é    N)Úsleep)ÚConnectionErrorÚTimeoutErrorc                   óF   — e Zd ZdZeeej                  ffd„Zde	fd„Z
d„ Zy)ÚRetryz0Retry a specific number of times after a failurec                 ó.   — || _         || _        || _        y)a'  
        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.
        N)Ú_backoffÚ_retriesÚ_supported_errors)ÚselfÚbackoffÚretriesÚsupported_errorss       úg/var/www/html/wine-match-dev/backend/winematch-backend/venv/lib/python3.12/site-packages/redis/retry.pyÚ__init__zRetry.__init__
   s   € ð  ˆŒØˆŒØ!1ˆÕó    Úspecified_errorsc                 ób   — t        t        | j                  t        |«      z   «      «      | _        y)zM
        Updates the supported errors with the specified error types
        N)ÚtupleÚsetr   )r   r   s     r   Úupdate_supported_errorszRetry.update_supported_errors   s*   € ô "'Ü×&Ñ&¬Ð/?Ó)@Ñ@ÓAó"
ˆÕr   c                 ó6  — | j                   j                  «        d}	 	  |«       S # | j                  $ rb}|dz  } ||«       | j                  dk\  r|| j                  kD  r|‚| j                   j	                  |«      }|dkD  rt        |«       Y d}~nd}~ww xY wŒ})a&  
        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   ÚdoÚfailÚfailuresÚerrorr   s         r   Úcall_with_retryzRetry.call_with_retry#   s’   € ð 	‰×ÑÔØˆØð	#Ù“tøØ×)Ñ)ò #Ø˜A‘ÙU”Ø—=‘= AÒ%¨(°T·]±]Ò*BØKØŸ-™-×/Ñ/°Ó9Ø˜Q’;Ü˜'”Nÿøð#úð s   Ÿ& ¦BµABÂBN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   ÚsocketÚtimeoutr   Úlistr   r    © r   r   r   r      s+   „ Ù:ð *¨<¸¿¹ÐHó	2ð"
¸ó 
ó#r   r   )r%   Útimer   Úredis.exceptionsr   r   r   r(   r   r   ú<module>r+      s   ðÛ Ý ç :÷/#ò /#r   