HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/lib/python3.9/site-packages/redis/commands/__pycache__/sentinel.cpython-39.pyc
a

��b�@s*ddlZGdd�d�ZGdd�de�ZdS)�Nc@sxeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�SentinelCommandszn
    A class containing the commands specific to redis sentinel. This class is
    to be used as a mixin.
    cGst�td��dS)�"Redis Sentinel's SENTINEL command.z%Use the individual sentinel_* methodsN)�warnings�warn�DeprecationWarning��self�args�r
�;/usr/lib/python3.9/site-packages/redis/commands/sentinel.py�sentinel
szSentinelCommands.sentinelcCs|�d|�S)z:Returns a (host, port) pair for the given ``service_name``z SENTINEL GET-MASTER-ADDR-BY-NAME�Zexecute_command�rZservice_namer
r
r� sentinel_get_master_addr_by_namesz1SentinelCommands.sentinel_get_master_addr_by_namecCs|�d|�S)z<Returns a dictionary containing the specified masters state.zSENTINEL MASTERr
rr
r
r�sentinel_mastersz SentinelCommands.sentinel_mastercCs
|�d�S)z>Returns a list of dictionaries containing each master's state.zSENTINEL MASTERSr
�rr
r
r�sentinel_masterssz!SentinelCommands.sentinel_masterscCs|�d||||�S)z,Add a new master to Sentinel to be monitoredzSENTINEL MONITORr
)r�nameZip�portZquorumr
r
r�sentinel_monitorsz!SentinelCommands.sentinel_monitorcCs|�d|�S)z*Remove a master from Sentinel's monitoringzSENTINEL REMOVEr
)rrr
r
r�sentinel_removesz SentinelCommands.sentinel_removecCs|�d|�S)z0Returns a list of sentinels for ``service_name``zSENTINEL SENTINELSr
rr
r
r�sentinel_sentinels"sz#SentinelCommands.sentinel_sentinelscCs|�d|||�S)z5Set Sentinel monitoring parameters for a given masterzSENTINEL SETr
)rr�option�valuer
r
r�sentinel_set&szSentinelCommands.sentinel_setcCs|�d|�S)z-Returns a list of slaves for ``service_name``zSENTINEL SLAVESr
rr
r
r�sentinel_slaves*sz SentinelCommands.sentinel_slavescCs|jd|dd�S)aP
        This command will reset all the masters with matching name.
        The pattern argument is a glob-style pattern.

        The reset process clears any previous state in a master (including a
        failover in progress), and removes every slave and sentinel already
        discovered and associated with the master.
        zSENTINEL RESETT��oncer
)r�patternr
r
r�sentinel_reset.s	zSentinelCommands.sentinel_resetcCs|�d|�S)a
        Force a failover as if the master was not reachable, and without
        asking for agreement to other Sentinels (however a new version of the
        configuration will be published so that the other Sentinels will
        update their configurations).
        zSENTINEL FAILOVERr
�rZnew_master_namer
r
r�sentinel_failover9sz"SentinelCommands.sentinel_failovercCs|jd|dd�S)a%
        Check if the current Sentinel configuration is able to reach the
        quorum needed to failover a master, and the majority needed to
        authorize the failover.

        This command should be used in monitoring systems to check if a
        Sentinel deployment is ok.
        zSENTINEL CKQUORUMTrr
r r
r
r�sentinel_ckquorumBs	z"SentinelCommands.sentinel_ckquorumcCs
|�d�S)a�
        Force Sentinel to rewrite its configuration on disk, including the
        current Sentinel state.

        Normally Sentinel rewrites the configuration every time something
        changes in its state (in the context of the subset of the state which
        is persisted on disk across restart).
        However sometimes it is possible that the configuration file is lost
        because of operation errors, disk failures, package upgrade scripts or
        configuration managers. In those cases a way to to force Sentinel to
        rewrite the configuration file is handy.

        This command works even if the previous configuration file is
        completely missing.
        zSENTINEL FLUSHCONFIGr
rr
r
r�sentinel_flushconfigMsz%SentinelCommands.sentinel_flushconfigN)�__name__�
__module__�__qualname__�__doc__rrrrrrrrrrr!r"r#r
r
r
rrs	rcs"eZdZdd��fdd�Z�ZS)�AsyncSentinelCommandsN)�returnc�st�j|�dS)rN)�superrr��	__class__r
rraszAsyncSentinelCommands.sentinel)r$r%r&r�
__classcell__r
r
r+rr(`sr()rrr(r
r
r
r�<module>s\