| Server IP : 77.50.203.18 / Your IP : 192.168.0.10 Web Server : Apache/2.4.62 (CentOS Stream) OpenSSL/3.5.7 mpm-itk/2.4.7-04 PHP/8.4.23 System : Linux web2 5.14.0-722.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 09:07:51 UTC 2026 x86_64 User : warsnews.ru ( 1001) PHP Version : 8.4.23 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.9/site-packages/cockpit/__pycache__/ |
Upload File : |
a
7(=j�2 � @ s� d dl Z d dlZd dlZd dlmZmZmZ ddlmZm Z ddl
mZmZm
Z
e�e�ZG dd� d�ZG dd � d �ZG d
d� de�ZG dd
� d
�ZG dd� d�ZG dd� de
�ZdS )� N)�Dict�List�Optional� )�
JsonObject� JsonValue)�CockpitProblem�CockpitProtocolError�CockpitProtocolServerc @ s. e Zd ZdZdd� Zdd� Zdd�dd �ZdS )
�ExecutionQueueaw Temporarily delay calls to a given set of class methods.
Functions by replacing the named function at the instance __dict__
level, effectively providing an override for exactly one instance
of `method`'s object.
Queues the invocations. Run them later with .run(), which also reverses
the redirection by deleting the named methods from the instance.
c C s* t �� | _|| _| jD ]}| �|� qd S �N)�collections�deque�queue�methods�_wrap)�selfr �method� r �2/usr/lib/python3.9/site-packages/cockpit/router.py�__init__ s
zExecutionQueue.__init__c s t � j� jj� �fdd�� d S )Nc s �j �� | f�S r )r �append)�args�r r r r �<lambda>% � z&ExecutionQueue._wrap.<locals>.<lambda>)�setattr�__self__�__func__�__name__)r r r r r r ! s zExecutionQueue._wrapN��returnc C sJ t �dt| j�� | jD ]\}}||� q| jD ]}t|j|jj� q0d S )Nz.ExecutionQueue: Running %d queued method calls) �logger�debug�lenr r �delattrr r r )r r r r r r �run'