
    mBNj                     l    d dl Z d dlZd dlmZ d dlmZ d dlm	Z	 dej                  fdZ	 	 	 	 	 	 ddZy)    N)RedisClusterconnc                     | j                   }|j                  j                         }|j                  t        j
                  u |d<   t        j                  di |j                  d      }d|v xr |d   dk(  S )Nsslserver)section
redis_modecluster )	connection_poolconnection_kwargscopyconnection_classredisSSLConnection
sync_redisRedisinfo)r   poolkwargsr   s       i/Users/ahmed/devFolder/Ultron/claude-voice/.venv/lib/python3.12/site-packages/falkordb/asyncio/cluster.py
Is_Clusterr   
   sz    D##((*F ))U-@-@@F5M %f%**8*<D4CD$6)$CC    c                    | j                   j                  }|j                  d      }	|j                  d      }
|j                  d      }|j                  d      }|j                  dd       }|j                  dt        t        t
        t        j                  t        j                  g      }t        |	|
||d|||||||||      S )	Nhostportusernamepasswordretryretry_on_errorT)r   r   r   r   decode_responsesr   r   r    require_full_coveragereinitialize_stepsread_from_replicasaddress_remapstartup_nodescluster_error_retry_attempts)
r   r   popConnectionRefusedErrorConnectionErrorTimeoutErrorsockettimeoutredis_exceptionsr   )r   r   r'   r&   r"   r#   r$   r%   r   r   r   r   r   r   r    s                  r   Cluster_Connr/      s     ,,>>  (D  (D $$Z0H $$Z0H!!'40E&**"NN,,	
	N %3--##%A r   )   NF   FN)r,   r   r   redis.asyncioasyncioredis.exceptions
exceptionsr.   redis.asyncio.clusterr   r   r   r/   r   r   r   <module>r7      s?       + .DU[[ D( "#*r   