1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Ë
 
çúh:ãó—ddlZddlZddlZddlmZmZmZmZmZm    Z    m
Z
ddl m Z ddl mZmZmZmZddlmZddlmZmZmZmZGd„de«ZGd    „d
e«ZGd „d e«ZGd „dee«ZGd„de«ZGd„de«Zy)éN)Ú AsyncIteratorÚIterableÚMappingÚOptionalÚSequenceÚTupleÚType)ÚRedis)Ú
ConnectionÚConnectionPoolÚ
EncodableTÚ SSLConnection)ÚAsyncSentinelCommands)ÚConnectionErrorÚ ReadOnlyErrorÚ ResponseErrorÚ TimeoutErrorcó —eZdZy)ÚMasterNotFoundErrorN©Ú__name__Ú
__module__Ú __qualname__©óõiH:\项目\archive\测试组\脚本\Change_password\venv_build\Lib\site-packages\redis/asyncio/sentinel.pyrró„Ørrcó —eZdZy)ÚSlaveNotFoundErrorNrrrrrrrrrc ór‡—eZdZˆfd„Zd„Zd„Zd„Zd„Z        ddddœd    ed
e    e
d e    e
d e    efˆfd „Z ˆxZ S)ÚSentinelManagedConnectionc óP•—|jd«|_t‰| di|¤Žy)NÚconnection_poolr)Úpopr#ÚsuperÚ__init__)ÚselfÚkwargsÚ    __class__s  €rr&z"SentinelManagedConnection.__init__s%ø€Ø%Ÿz™zÐ*;Ó<ˆÔÜ ‰ÑÑ"˜6Ó"rcóƗd|jj›d|jj›}|jr!d|j›d|j›}||z }|dzS)Nú<ú.z,host=z,port=z)>)r)rrÚhostÚport)r'ÚsÚ    host_infos   rÚ__repr__z"SentinelManagedConnection.__repr__#s]€Ø—‘×)Ñ)Ð*¨!¨D¯N©N×,CÑ,CÐ+DÐ EˆØ 9Š9Ø  §¡  ¨6°$·)±)°Ð=ˆIØ ‰NˆAؐ4‰xˆrcƒóŒK—|\|_|_|j|jjd¬«ƒd{–—†y7Œ­w)NF)Ú check_healthÚretry_socket_connect)r-r.Úconnect_check_healthr#Úcheck_connection)r'Úaddresss  rÚ
connect_toz$SentinelManagedConnection.connect_to*sCèø€Ø&шŒ    4”9Ø×'Ñ'Ø×-Ñ-×>Ñ>Ø!&ð(ó
÷    
ò    
ús‚:A¼A½Acƒó~K—|jry|jjr:|j|jj    «ƒd{–—†«ƒd{–—†y|jj «23d{–—†}    |j|«ƒd{–—†cS7ŒP7ŒF7Œ$7Œ #t $rYŒ8wxYw6t‚­w©N)Ú_readerr#Ú    is_masterr8Úget_master_addressÚ rotate_slavesrr)r'Úslaves  rÚ_connect_retryz(SentinelManagedConnection._connect_retry1s¬èø€Ø <Š<Ø Ø × Ñ × )Ò )Ø—/‘/¨×(<Ñ(<×(OÑ(OÓ(Q×"QÓR× RÑ Rà#×3Ñ3×AÑAÓC÷ ð eðØ!%§¡°Ó!7×7Ò7ð    #RøÐ Røð øà7ùÜ&òÙðúð Dô
%Ð $ùsx‚A B=ÁBÁ B=ÁB!ÁB=Á:B6Á>B#Á?B6ÂB=ÂB'ÂB%ÂB'ÂB=Â!B=Â#B6Â%B'Â'    B3Â0B=Â2B3Â3
B=cƒólK—|jj|jd„«ƒd{–—†S7Œ­w)Ncó,—tjd«S)Nr)ÚasyncioÚsleep)Úerrors rú<lambda>z3SentinelManagedConnection.connect.<locals>.<lambda>As€œ'Ÿ-™-¨Ó*€r)ÚretryÚcall_with_retryr@©r's rÚconnectz!SentinelManagedConnection.connect>s3èø€Ø—Z‘Z×/Ñ/Ø × Ñ Ù *ó
÷
ð    
ð
ús ‚+4­2®4FT)Údisconnect_on_errorÚ push_requestÚdisable_decodingÚtimeoutrKrLcƒóؕK—    t‰|||||¬«ƒd{–—†S7Œ#t$r<|jjr$|j «ƒd{–—†7t d«‚‚wxYw­w)N)rMrNrKrLz"The previous master is now a slave)r%Ú read_responserr#r<Ú
disconnectr)r'rMrNrKrLr)s     €rrPz'SentinelManagedConnection.read_responseDsyøèø€ð    Ü™Ñ.Ø!1ØØ$7Ø)ð    /ó÷ð ðùô ò        Ø×#Ñ#×-Ò-ð —o‘oÓ'×'Ñ'Ü%Ð&JÓKÐKØ ð        üs1ƒA*…"› œ"ŸA* "¢2A'ÁAÁA'Á'A*)FN) rrrr&r1r8r@rJÚboolrÚfloatrPÚ __classcell__©r)s@rr!r!smø„ô#òò
ò %ò
ð"'Ø#'ðð
04Ø',ò àðð˜%‘ðð
& e™_ð ð ˜t‘n÷ ñrr!có —eZdZy)ÚSentinelManagedSSLConnectionNrrrrrWrW_rrrWcóT‡—eZdZdZˆfd„Zd„Zˆfd„Zdefˆfd„ Zd„Z    de
fd    „Z ˆxZ S)
ÚSentinelConnectionPoolz¸
    Sentinel backed connection pool.
 
    If ``check_connection`` flag is set to True, SentinelManagedConnection
    sends a PING command right after establishing the connection.
    c ó^•—|jd|jdd«rtnt«|d<|jdd«|_|jdd«|_t ‰|di|¤Žtj|«|jd<||_ ||_ d|_ d|_y)    NÚconnection_classÚsslFr<Tr6r#r)Úgetr$rWr!r<r6r%r&ÚweakrefÚproxyÚconnection_kwargsÚ service_nameÚsentinel_managerÚmaster_addressÚslave_rr_counter)r'rarbr(r)s    €rr&zSentinelConnectionPool.__init__ks¤ø€Ø%+§Z¡ZØ ð—:‘:˜e UÔ+õ-ä.ó &
ˆÐ!Ñ"ð Ÿ™ K°Ó6ˆŒØ &§
¡
Ð+=¸uÓ EˆÔÜ ‰ÑÑ"˜6Ò"Ü4;·M±MÀ$Ó4Gˆ×ÑÐ0Ñ1Ø(ˆÔØ 0ˆÔØ"ˆÔØ $ˆÕrc    ó¨—d|jj›d|jj›d|j›d|jxrdxsd›d    S)Nr+r,z    (service=ú(Úmasterr?z))>)r)rrrar<rIs rr1zSentinelConnectionPool.__repr__}sV€à—‘×)Ñ)Ð*¨!¨D¯N©N×,CÑ,CÐ+Dؘ×)Ñ)Ð*¨!¨D¯N©NÒ,G¸xÒ,RÈ7Ð+SÐSVð Xð    
rcó>•—t‰|«d|_d|_yr:)r%Úresetrcrd)r'r)s €rrizSentinelConnectionPool.resetƒsø€Ü ‰‰ ŒØ"ˆÔØ $ˆÕrÚ
connectioncó®•—|j xs3|jxr%|j|j|jfk(}|xrt‰||«Sr:)r<rcr-r.r%Úowns_connection)r'rjÚcheckr)s   €rrlz&SentinelConnectionPool.owns_connectionˆsRø€Ø—N‘NÐ"ò
Ø N‰NÒ X˜t×2Ñ2°z·±È
ÏÉÐ6XÑXð    ðÒ<œ™Ñ0°Ó<Ð<rcƒóèK—|jj|j«ƒd{–—†}|jr0|j|k7r!||_|j d¬«ƒd{–—†|S7ŒB7Œ­w)NF)Úinuse_connections)rbÚdiscover_masterrar<rcrQ)r'rcs  rr=z)SentinelConnectionPool.get_master_addressŽsjèø€Ø#×4Ñ4×DÑDÀT×EVÑEVÓW×WˆØ >Š>Ø×"Ñ" nÒ4Ø&4Ô#ð—o‘o¸oÓ>×>Ð>ØÐðXøð ?ús!‚)A2«A.¬;A2Á'A0Á(A2Á0A2ÚreturncóöK—|jj|j«ƒd{–—†}|r€|j€'t    j
dt |«dz
«|_tt |««D]6}|jdzt |«z|_||j}|­–—Œ8    |j«ƒd{–—†­–—td|j›«‚7Œº7Œ!#t$rYŒ'wxYw­w)zRound-robin slave balancerNrézNo slave found for ) rbÚdiscover_slavesrardÚrandomÚrandintÚlenÚranger=rr)r'ÚslavesÚ_r?s    rr>z$SentinelConnectionPool.rotate_slaves˜sèèø€à×,Ñ,×<Ñ<¸T×=NÑ=NÓO×OˆÙ Ø×$Ñ$Ð,Ü(.¯©°q¼#¸f»+ȹ/Ó(JÔ%Üœ3˜v›;Ó'ò Ø)-×)>Ñ)>ÀÑ)BÄcÈ&ÃkÑ(QÔ%ؘt×4Ñ4Ñ5Ø” ð ð
    Ø×/Ñ/Ó1×1Ó 1ô!Ð#6°t×7HÑ7HÐ6KÐ!LÓMÐMðPøð2ùÜ"ò    Ù ð    üsF‚)C9«C&¬BC9Â3C*ÃC(ÃC*ÃC9Ã(C*Ã*    C6Ã3C9Ã5C6Ã6C9) rrrÚ__doc__r&r1rir rlr=rr>rTrUs@rrYrYcs6ø„ñô%ò$
ô %ð
=¨*õ=ò ðN ]÷NrrYcóܗeZdZdZ            dd„Zd„Zd„Zdedede    fd    „Z
defd
„Z d e e deeeeffd „Zdedeeeeffd „Zeefdedeedeefd„Zeefdedeedeefd„Zy)ÚSentinela~
    Redis Sentinel cluster client
 
    >>> from redis.sentinel import Sentinel
    >>> sentinel = Sentinel([('localhost', 26379)], socket_timeout=0.1)
    >>> master = sentinel.master_for('mymaster', socket_timeout=0.1)
    >>> await master.set('foo', 'bar')
    >>> slave = sentinel.slave_for('mymaster', socket_timeout=0.1)
    >>> await slave.get('foo')
    b'bar'
 
    ``sentinels`` is a list of sentinel nodes. Each node is represented by
    a pair (hostname, port).
 
    ``min_other_sentinels`` defined a minimum number of peers for a sentinel.
    When querying a sentinel, if it doesn't meet this threshold, responses
    from that sentinel won't be considered valid.
 
    ``sentinel_kwargs`` is a dictionary of connection arguments used when
    connecting to sentinel instances. Any argument that can be passed to
    a normal Redis connection can be specified here. If ``sentinel_kwargs`` is
    not specified, any socket_timeout and socket_keepalive options specified
    in ``connection_kwargs`` will be used.
 
    ``connection_kwargs`` are keyword arguments that will be used when
    establishing a connection to a Redis server.
    Nc
ó"—|€5|j«Dcic]\}}|jd«sŒ||“Œ}}}||_|D    cgc]\}}    td||    dœ|j¤Ž‘Œc}    }|_||_||_||_ycc}}wcc}    }w)NÚsocket_)r-r.r)ÚitemsÚ
startswithÚsentinel_kwargsr
Ú    sentinelsÚmin_other_sentinelsr`Ú_force_master_ip)
r'rƒr„r‚Úforce_master_ipr`ÚkÚvÚhostnamer.s
          rr&zSentinel.__init__Çs£€ð Ð "à!2×!8Ñ!8Ó!:÷Ù˜˜A¸a¿l¹lÈ9Õ>U1‘ðˆOñð /ˆÔð#,÷
ᐘ$ô Ð Cx dÑ C¨d×.BÑ.BÓ Có
ˆŒð$7ˆÔ Ø!2ˆÔØ /ˆÕùóùó
 
s–B°BÁ"B c
óÚK—t|jdd««}t|jdd««}|rBtj|j«j
|i|¤Žƒd{–—†}|r|gS|rdSdS|jDcgc]'}t j|j
|i|¤Ž«‘Œ)}}t j|Žƒd{–—†}|r|St|«S7Œtcc}w7Œ­w)zÚ
        Execute Sentinel command in sentinel nodes.
        once - If set to True, then execute the resulting command on a single
               node at random, rather than across the entire sentinel cluster.
        ÚonceFÚreturn_responsesNT)
rRr$ruÚchoicerƒÚexecute_commandrCÚTaskÚgatherÚall)    r'Úargsr(r‹rŒÚresponseÚsentinelÚtasksÚ    responsess             rrŽzSentinel.execute_commandßsöèø€ô F—J‘J˜v uÓ-Ó.ˆô  §
¡
Ð+=¸uÓ EÓFÐá ØJœVŸ]™]¨4¯>©>Ó:×JÑJØðØñ÷ˆHñ Ø zÐ!á'tÐ2¨UÐ2ð!ŸN™Nö
àô L‰LÐ1˜×1Ñ1°4ÐB¸6ÑBÕ Cð
ˆð
ô"Ÿ.™.¨%Ð0×0ˆ    á ØÐ ä9‹~Ðð#úò
ð1ús0‚A+C+Á-C"Á.C+ ,C$Â7C+ÃC)ÃC+Ã$C+có"—g}|jD]F}|j|jjd›d|jjd›«ŒHd|j›d|jj
›ddj |«›dS)    Nr-ú:r.r+r,z (sentinels=[ú,z])>)rƒÚappendr#r`r)rÚjoin)r'Úsentinel_addressesr”s   rr1zSentinel.__repr__ÿsœ€ØÐØŸ™ò    ˆHØ × %Ñ %Ø×+Ñ+×=Ñ=¸fÑEÐFÀaØ×+Ñ+×=Ñ=¸fÑEÐFðHõ ð    ð —‘Иq §¡×!8Ñ!8Р9ؘ3Ÿ8™8Ð$6Ó7Ð8¸ð =ð    
rÚstaterarqcóJ—|dr
|ds|dry|d|jkryy)Nr<Úis_sdownÚis_odownFznum-other-sentinelsT)r„)r'rras   rÚcheck_master_statezSentinel.check_master_state s5€Ø[Ò! U¨:Ò%6¸%À
Ò:KØà Ð&Ñ '¨$×*BÑ*BÒ BØØrcƒóJK—t«}t|j«D]–\}}    |j«ƒd{–—†}|j|«}|sŒ3|j||«sŒF||jdc|jd<|j|<|j |jn|d}||dfcSd}    t|«dkDrddj|«›}    td    |›|    ›«‚7Œ²#tt
f$r }|j |›d|›«Yd}~Œùd}~wwxYw­w)
        Asks sentinel servers for the Redis master's address corresponding
        to the service labeled ``service_name``.
 
        Returns a pair (address, port) or raises MasterNotFoundError if no
        master is found.
        Nz - rÚipr.Úz : z, zNo master found for ) ÚlistÚ    enumeraterƒÚsentinel_mastersrrršr]r¡r…rwr›r)
r'raÚcollected_errorsÚ sentinel_nor”ÚmastersÚerr£Ú
error_infos
          rrpzSentinel.discover_masters@èø€ô ›6ÐÜ%.¨t¯~©~Ó%>ò    )Ñ !ˆK˜ð Ø (× 9Ñ 9Ó ;×;ð—K‘K  Ó-ˆEÚ˜×0Ñ0°¸ ÕEðØ—N‘N 1Ñ%ð?—‘˜qÑ! 4§>¡>°+Ñ#>ð×,Ñ,Ð8ð×)Ò)à˜t™ðð
˜5 ™=Ð(Ò(ð'    )ð*ˆ
Ü ÐÓ   1Ò $ؘtŸy™yÐ)9Ó:Ð;Ð<ˆJÜ!Ð$8¸Ð8HÈÈ Ð"UÓVÐVð-<ùÜ#¤\Ð2ò Ø ×'Ñ'¨8¨*°C¸°uÐ(=Ô>Üûð üsK‚&D#©C1¼C/½C1ÁD#ÁD#Á(BD#Ã/C1Ã1D ÄDÄD#ÄD Ä D#rycó`—g}|D]&}|ds|drŒ|j|d|df«Œ(|S)z1Remove slaves that are in an ODOWN or SDOWN stater rŸr£r.)rš)r'ryÚ slaves_aliver?s    rÚ filter_slaveszSentinel.filter_slaves6sM€ðˆ Øò    >ˆEؐZÒ  E¨*Ò$5ØØ × Ñ   t¡¨e°F©mР<Õ =ð    >ðÐrcƒóÊK—|jD]3}    |j|«ƒd{–—†}|j |«}|sŒ1|cSgS7Œ#tttf$rYŒPwxYw­w)z;Returns a list of alive slaves for service ``service_name``N)rƒÚsentinel_slavesrrrr¯)r'rar”rys    rrtzSentinel.discover_slavesAsrèø€ðŸ™ò    ˆHð Ø'×7Ñ7¸ ÓE×Eð×'Ñ'¨Ó/ˆFÚØ’ ð    ðˆ    ð FùÜ#¤]´LÐAò Ùð üs=‚A#“A    §A¨A    ¬A#ÁA#ÁA    Á    A ÁA#ÁA Á A#Ú redis_classÚconnection_pool_classc óŽ—d|d<t|j«}|j|«|||fi|¤Ž}|j|«S)aý
        Returns a redis client instance for the ``service_name`` master.
        Sentinel client will detect failover and reconnect Redis clients
        automatically.
 
        A :py:class:`~redis.sentinel.SentinelConnectionPool` class is
        used to retrieve the master's address before establishing a new
        connection.
 
        NOTE: If the master's address has changed, any cached connections to
        the old master are closed.
 
        By default clients will be a :py:class:`~redis.Redis` instance.
        Specify a different class to the ``redis_class`` argument if you
        desire something different.
 
        The ``connection_pool_class`` specifies the connection pool to
        use.  The :py:class:`~redis.sentinel.SentinelConnectionPool`
        will be used by default.
 
        All other keyword arguments are merged with any connection_kwargs
        passed to this class and passed to the connection pool as keyword
        arguments to be used to initialize Redis connections.
        Tr<©Údictr`ÚupdateÚ    from_pool©r'rar²r³r(r`r#s       rÚ
master_forzSentinel.master_forOsP€ð>#ˆˆ{ÑÜ  ×!7Ñ!7Ó8ÐØ× Ñ  Ô(á/° ¸dÑXÐFWÑXˆà×$Ñ$ _Ó5Ð5rc óŽ—d|d<t|j«}|j|«|||fi|¤Ž}|j|«S)aâ
        Returns redis client instance for the ``service_name`` slave(s).
 
        A SentinelConnectionPool class is used to retrieve the slave's
        address before establishing a new connection.
 
        By default clients will be a :py:class:`~redis.Redis` instance.
        Specify a different class to the ``redis_class`` argument if you
        desire something different.
 
        The ``connection_pool_class`` specifies the connection pool to use.
        The SentinelConnectionPool will be used by default.
 
        All other keyword arguments are merged with any connection_kwargs
        passed to this class and passed to the connection pool as keyword
        arguments to be used to initialize Redis connections.
        Fr<rµr¹s       rÚ    slave_forzSentinel.slave_forvsP€ð0$ˆˆ{ÑÜ  ×!7Ñ!7Ó8ÐØ× Ñ  Ô(á/° ¸dÑXÐFWÑXˆà×$Ñ$ _Ó5Ð5r)rNN)rrrr{r&rŽr1r¶ÚstrrRr¡rprrrrr r¯rtr
rYr    rºr¼rrrr}r}ªsÿ„ñð>ØØó 0ò0ò@
 
ð¨ð¸CðÀDóð!W°#ó!WðF    Ø˜wÑ'ð    à    %˜
 JÐ.Ñ/Ñ    0ó    ð Øð à    %˜
 JÐ.Ñ/Ñ    0ó ð"$)Ø>Tñ    %6àð%6ð˜%‘[ð%6ð $Ð$:Ñ;ó    %6ðT$)Ø>Tñ    6àð6ð˜%‘[ð6ð $Ð$:Ñ;ô    6rr})rCrur^Útypingrrrrrrr    Úredis.asyncio.clientr
Úredis.asyncio.connectionr r r rÚredis.commandsrÚredis.exceptionsrrrrrrr!rWrYr}rrrú<module>rÃs‡ðÛÛ ÛßT×TÑTå&÷óõ 1÷óô    ˜/ô    ô    ˜ô    ô> 
ô>ôB    Ð#<¸mô    ôDN˜^ôDNôNj6Ð$õj6r