Linux spg20.cloudpowerdns.com 5.14.0-611.35.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 25 03:46:09 EST 2026 x86_64
LiteSpeed
Server IP : 46.4.120.162 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : seatingsolutions
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.9 /
site-packages /
redis /
__pycache__ /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.cpython-39.opt-1.pyc
1.56
KB
-rw-r--r--
2022-06-11 19:53
__init__.cpython-39.pyc
1.56
KB
-rw-r--r--
2022-06-11 19:53
backoff.cpython-39.opt-1.pyc
3.95
KB
-rw-r--r--
2022-06-11 19:53
backoff.cpython-39.pyc
3.95
KB
-rw-r--r--
2022-06-11 19:53
client.cpython-39.opt-1.pyc
62.09
KB
-rw-r--r--
2022-06-11 19:53
client.cpython-39.pyc
62.09
KB
-rw-r--r--
2022-06-11 19:53
cluster.cpython-39.opt-1.pyc
55.47
KB
-rw-r--r--
2022-06-11 19:53
cluster.cpython-39.pyc
55.47
KB
-rw-r--r--
2022-06-11 19:53
compat.cpython-39.opt-1.pyc
298
B
-rw-r--r--
2022-06-11 19:53
compat.cpython-39.pyc
298
B
-rw-r--r--
2022-06-11 19:53
connection.cpython-39.opt-1.pyc
38.14
KB
-rw-r--r--
2022-06-11 19:53
connection.cpython-39.pyc
38.14
KB
-rw-r--r--
2022-06-11 19:53
crc.cpython-39.opt-1.pyc
731
B
-rw-r--r--
2022-06-11 19:53
crc.cpython-39.pyc
731
B
-rw-r--r--
2022-06-11 19:53
exceptions.cpython-39.opt-1.pyc
7.14
KB
-rw-r--r--
2022-06-11 19:53
exceptions.cpython-39.pyc
7.14
KB
-rw-r--r--
2022-06-11 19:53
lock.cpython-39.opt-1.pyc
9.86
KB
-rw-r--r--
2022-06-11 19:53
lock.cpython-39.pyc
9.86
KB
-rw-r--r--
2022-06-11 19:53
ocsp.cpython-39.opt-1.pyc
9.41
KB
-rw-r--r--
2022-06-11 19:53
ocsp.cpython-39.pyc
9.41
KB
-rw-r--r--
2022-06-11 19:53
retry.cpython-39.opt-1.pyc
1.95
KB
-rw-r--r--
2022-06-11 19:53
retry.cpython-39.pyc
1.95
KB
-rw-r--r--
2022-06-11 19:53
sentinel.cpython-39.opt-1.pyc
11.35
KB
-rw-r--r--
2022-06-11 19:53
sentinel.cpython-39.pyc
11.35
KB
-rw-r--r--
2022-06-11 19:53
typing.cpython-39.opt-1.pyc
1.81
KB
-rw-r--r--
2022-06-11 19:53
typing.cpython-39.pyc
1.81
KB
-rw-r--r--
2022-06-11 19:53
utils.cpython-39.opt-1.pyc
2.12
KB
-rw-r--r--
2022-06-11 19:53
utils.cpython-39.pyc
2.12
KB
-rw-r--r--
2022-06-11 19:53
Save
Rename
a ��b:- � @ sf d dl Z d dlZd dlZd dlmZmZ d dlmZm Z d dl mZmZ d dl mZ G dd� d�ZdS )� N)�SimpleNamespace� TracebackType)�Optional�Type)� LockError�LockNotOwnedError)�Numberc @ sF e Zd ZdZdZdZdZdZdZdZ d,e ee ee ee e d�d d �Zdd�dd �Zd d�dd�Zeee ee ee dd�dd�Zddddd�ee ee ee ee d�dd�Ze e d�dd�Ze d�dd�Ze d�dd�Zdd�dd�Ze dd�d d!�Zd-ee e d#�d$d%�Zee e d#�d&d'�Ze d�d(d)�Ze d�d*d+�ZdS ).�Lockz� A shared, distributed Lock. Using Redis for locking allows the Lock to be shared across processes and/or machines. It's left to the user to resolve deadlock issues and make sure multiple clients play nicely together. Nz� local token = redis.call('get', KEYS[1]) if not token or token ~= ARGV[1] then return 0 end redis.call('del', KEYS[1]) return 1 a� local token = redis.call('get', KEYS[1]) if not token or token ~= ARGV[1] then return 0 end local expiration = redis.call('pttl', KEYS[1]) if not expiration then expiration = 0 end if expiration < 0 then return 0 end local newttl = ARGV[2] if ARGV[3] == "0" then newttl = ARGV[2] + expiration end redis.call('pexpire', KEYS[1], newttl) return 1 z� local token = redis.call('get', KEYS[1]) if not token or token ~= ARGV[1] then return 0 end redis.call('pexpire', KEYS[1], ARGV[2]) return 1 皙�����?T)�name�timeout�sleep�blocking�blocking_timeout�thread_localc C sX || _ || _|| _|| _|| _|| _t|�| _| jr<t� � nt � | _ d| j _| �� dS )a� Create a new Lock instance named ``name`` using the Redis client supplied by ``redis``. ``timeout`` indicates a maximum life for the lock in seconds. By default, it will remain locked until release() is called. ``timeout`` can be specified as a float or integer, both representing the number of seconds to wait. ``sleep`` indicates the amount of time to sleep in seconds per loop iteration when the lock is in blocking mode and another client is currently holding the lock. ``blocking`` indicates whether calling ``acquire`` should block until the lock has been acquired or to fail immediately, causing ``acquire`` to return False and the lock not being acquired. Defaults to True. Note this value can be overridden by passing a ``blocking`` argument to ``acquire``. ``blocking_timeout`` indicates the maximum amount of time in seconds to spend trying to acquire the lock. A value of ``None`` indicates continue trying forever. ``blocking_timeout`` can be specified as a float or integer, both representing the number of seconds to wait. ``thread_local`` indicates whether the lock token is placed in thread-local storage. By default, the token is placed in thread local storage so that a thread only sees its token, not a token set by another thread. Consider the following timeline: time: 0, thread-1 acquires `my-lock`, with a timeout of 5 seconds. thread-1 sets the token to "abc" time: 1, thread-2 blocks trying to acquire `my-lock` using the Lock instance. time: 5, thread-1 has not yet completed. redis expires the lock key. time: 5, thread-2 acquired `my-lock` now that it's available. thread-2 sets the token to "xyz" time: 6, thread-1 finishes its work and calls release(). if the token is *not* stored in thread local storage, then thread-1 would see the token value as "xyz" and would be able to successfully release the thread-2's lock. In some use cases it's necessary to disable thread local storage. For example, if you have code where one thread acquires a lock and passes that lock instance to a worker thread to release later. If thread local storage isn't disabled in this case, the worker thread won't see the token set by the thread that acquired the lock. Our assumption is that these cases aren't common and as such default to using thread local storage. N) �redisr r r r r �boolr � threading�localr �token�register_scripts)�selfr r r r r r r � r �./usr/lib/python3.9/site-packages/redis/lock.py�__init__L s < z Lock.__init__)�returnc C sX | j }| j}|jd u r$|�|j�|_|jd u r<|�|j�|_|jd u rT|�|j�|_d S �N) � __class__r �lua_releaseZregister_script�LUA_RELEASE_SCRIPT� lua_extend�LUA_EXTEND_SCRIPT� lua_reacquire�LUA_REACQUIRE_SCRIPT)r �cls�clientr r r r � s zLock.register_scriptsc C s | � � r| S td��d S )Nz0Unable to acquire lock within the time specified)�acquirer �r r r r � __enter__� s zLock.__enter__)�exc_type� exc_value� tracebackr c C s | � � d S r )�release)r r) r* r+ r r r �__exit__� s z Lock.__exit__)r r r r c C s� |du r| j }|du r&t�� j�� }n| j�� }|�|�}|du rH| j}|du rV| j}d}|durnt � � | }| �|�r�|| j_ dS |s�dS t � � | }|dur�||kr�dS t � |� qndS )as Use Redis to hold a shared, distributed lock named ``name``. Returns True once the lock is acquired. If ``blocking`` is False, always return immediately. If the lock was acquired, return True, otherwise return False. ``blocking_timeout`` specifies the maximum number of seconds to wait trying to acquire the lock. ``token`` specifies the token value to be used. If provided, token must be a bytes object or a string that can be encoded to a bytes object with the default encoding. If a token isn't specified, a UUID will be generated. NTF)r �uuidZuuid1�hex�encoder �get_encoderr r �mod_time� monotonic� do_acquirer r )r r r r r �encoderZstop_trying_atZnext_try_atr r r r&