
    +h                        d Z  G d de      Z G d de      Z G d de      Z G d de      Z G d	 d
e      Z G d de      Z G d de      Z G d de      Z	 G d de      Z
 G d de      Z G d de      Z G d de	      Z G d de	      Z G d de	      Z G d de	      Z G d d e	      Z G d! d"e	      Z G d# d$ee      Z G d% d&e      Z G d' d(e      Z G d) d*e	      Z G d+ d,e      Z G d- d.e      Z G d/ d0ee	      Z G d1 d2e	      Z G d3 d4e	      Z G d5 d6e	      Z G d7 d8e      Z G d9 d:e      Z G d; d<e      Z  G d= d>e      Z!y?)@z*Core exceptions raised by the Redis clientc                       e Zd Zy)
RedisErrorN__name__
__module____qualname__     C/var/www/html/venv/lib/python3.12/site-packages/redis/exceptions.pyr   r          r	   r   c                       e Zd Zy)ConnectionErrorNr   r   r	   r
   r   r      r   r	   r   c                       e Zd Zy)TimeoutErrorNr   r   r	   r
   r   r      r   r	   r   c                       e Zd Zy)AuthenticationErrorNr   r   r	   r
   r   r      r   r	   r   c                       e Zd Zy)AuthorizationErrorNr   r   r	   r
   r   r      r   r	   r   c                       e Zd Zy)BusyLoadingErrorNr   r   r	   r
   r   r      r   r	   r   c                       e Zd Zy)InvalidResponseNr   r   r	   r
   r   r      r   r	   r   c                       e Zd Zy)ResponseErrorNr   r   r	   r
   r   r       r   r	   r   c                       e Zd Zy)	DataErrorNr   r   r	   r
   r   r   $   r   r	   r   c                       e Zd Zy)PubSubErrorNr   r   r	   r
   r   r   (   r   r	   r   c                       e Zd Zy)
WatchErrorNr   r   r	   r
   r   r   ,   r   r	   r   c                       e Zd Zy)NoScriptErrorNr   r   r	   r
   r!   r!   0   r   r	   r!   c                       e Zd ZdZy)OutOfMemoryErroraU  
    Indicates the database is full. Can only occur when either:
      * Redis maxmemory-policy=noeviction
      * Redis maxmemory-policy=volatile* and there are no evictable keys

    For more information see `Memory optimization in Redis <https://redis.io/docs/management/optimization/memory-optimization/#memory-allocation>`_. # noqa
    Nr   r   r   __doc__r   r	   r
   r#   r#   4        	r	   r#   c                       e Zd Zy)ExecAbortErrorNr   r   r	   r
   r(   r(   @   r   r	   r(   c                       e Zd Zy)ReadOnlyErrorNr   r   r	   r
   r*   r*   D   r   r	   r*   c                       e Zd Zy)NoPermissionErrorNr   r   r	   r
   r,   r,   H   r   r	   r,   c                       e Zd Zy)ModuleErrorNr   r   r	   r
   r.   r.   L   r   r	   r.   c                       e Zd ZdZy)	LockErrorz$Errors acquiring or releasing a lockNr$   r   r	   r
   r0   r0   P   s
    * 	r	   r0   c                       e Zd ZdZy)LockNotOwnedErrorzBError trying to extend or release a lock that is (no longer) ownedNr$   r   r	   r
   r2   r2   W       Hr	   r2   c                       e Zd ZdZy)ChildDeadlockedErrorzBError indicating that a child process is deadlocked after a fork()Nr$   r   r	   r
   r5   r5   \   r3   r	   r5   c                       e Zd ZdZy)$AuthenticationWrongNumberOfArgsErrorz^
    An error to indicate that the wrong number of args
    were sent to the AUTH command
    Nr$   r   r	   r
   r7   r7   a       
 	r	   r7   c                       e Zd ZdZy)RedisClusterExceptionz4
    Base exception for the RedisCluster client
    Nr$   r   r	   r
   r:   r:   j   s     	r	   r:   c                       e Zd ZdZy)ClusterErrorzm
    Cluster errors occurred multiple times, resulting in an exhaustion of the
    command execution TTL
    Nr$   r   r	   r
   r<   r<   r   r8   r	   r<   c                       e Zd ZdZd Zy)ClusterDownErrora  
    Error indicated CLUSTERDOWN error received from cluster.
    By default Redis Cluster nodes stop accepting queries if they detect there
    is at least a hash slot uncovered (no available node is serving it).
    This way if the cluster is partially down (for example a range of hash
    slots are no longer covered) the entire cluster eventually becomes
    unavailable. It automatically returns available as soon as all the slots
    are covered again.
    c                 "    |f| _         || _        y N)argsmessage)selfresps     r
   __init__zClusterDownError.__init__   s    G	r	   Nr   r   r   r%   rE   r   r	   r
   r>   r>   {   s    r	   r>   c                       e Zd ZdZd Zy)AskErrora)  
    Error indicated ASK error received from cluster.
    When a slot is set as MIGRATING, the node will accept all queries that
    pertain to this hash slot, but only if the key in question exists,
    otherwise the query is forwarded using a -ASK redirection to the node that
    is target of the migration.

    src node: MIGRATING to dst node
        get > ASK error
        ask dst node > ASKING command
    dst node: IMPORTING from src node
        asking command only affects next command
        any op will be allowed after asking command
    c                     |f| _         || _        |j                  d      \  }}|j                  dd      \  }}t	        |      | _        |t	        |      fx| _        \  | _        | _        y)z#should only redirect to master node :   N)	rA   rB   splitrsplitintslot_id	node_addrhostport)rC   rD   rP   new_noderR   rS   s         r
   rE   zAskError.__init__   s`    G	 JJsO__S!,
d7|04c$i?-DIr	   NrF   r   r	   r
   rH   rH      s    @r	   rH   c                       e Zd ZdZd Zy)TryAgainErrorz
    Error indicated TRYAGAIN error received from cluster.
    Operations on keys that don't exist or are - during resharding - split
    between the source and destination nodes, will generate a -TRYAGAIN error.
    c                      y r@   r   )rC   rA   kwargss      r
   rE   zTryAgainError.__init__   s    r	   NrF   r   r	   r
   rV   rV      s    r	   rV   c                       e Zd ZdZdZy)ClusterCrossSlotErrorz
    Error indicated CROSSSLOT error received from cluster.
    A CROSSSLOT error is generated when keys in a request don't hash to the
    same slot.
    z+Keys in request don't hash to the same slotN)r   r   r   r%   rB   r   r	   r
   rZ   rZ      s     <Gr	   rZ   c                       e Zd ZdZy)
MovedErrorz
    Error indicated MOVED error received from cluster.
    A request sent to a node that doesn't serve this key will be replayed with
    a MOVED error that points to the correct node.
    Nr$   r   r	   r
   r\   r\      s     	r	   r\   c                       e Zd ZdZy)MasterDownErrorz
    Error indicated MASTERDOWN error received from cluster.
    Link with MASTER is down and replica-serve-stale-data is set to 'no'.
    Nr$   r   r	   r
   r^   r^      r8   r	   r^   c                       e Zd ZdZy)SlotNotCoveredErrora  
    This error only happens in the case where the connection pool will try to
    fetch what node that is covered by a given slot.

    If this error is raised the client should drop the current node layout and
    attempt to reconnect and refresh the node layout again
    Nr$   r   r	   r
   r`   r`      r&   r	   r`   c                       e Zd Zy)MaxConnectionsErrorNr   r   r	   r
   rb   rb      s    r	   rb   N)"r%   	Exceptionr   r   r   r   r   r   r   r   r   r   r   r!   r#   r(   r*   r,   r.   
ValueErrorr0   r2   r5   r7   r:   r<   r>   rH   rV   rZ   r\   r^   r`   rb   r   r	   r
   <module>re      s   ,	 		j 		: 		/ 		 		 		j 		J 		
 		* 		 		M 			} 			] 		M 		 		- 		
J 			 	
	9 	
	= 		I 		: 	|]  @} @4M <M <	 		& 			/ 		/ r	   