ó
    Ö›‘hñ	  ã                   ól   • S r SSKJrJr  SSKJr  SSKJr   " S S\R                  5      rS\S\4S	 jr	g
)z>
Support for creating a service which runs a process monitor.
é    )ÚListÚSequence)Úusage)ÚProcessMonitorc                   óŒ   • \ rS rSr% SrSrSSSS\/SS	S
S\/SSSS\/SSSS\//r/ r\	\
\      \S'   SrS\SS4S jrSS jrSrg)ÚOptionsé   z>
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ÚMi  zLThe 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                 ó   • XS'   g)zA
Grab the command line that is going to be started and monitored
r   N© )Úselfr   s     Ú]C:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/runner/procmontap.pyÚ	parseArgsÚOptions.parseArgsI   s   € ð ˆVŠó    c                 óT   • [        U S   5      S:  a  [        R                  " S5      eg)z
Check for dependencies.
r   r   z$Please specify a process commandlineN)Úlenr   Ú
UsageError)r   s    r   ÚpostOptionsÚOptions.postOptionsO   s,   € ô ˆt�F‰|Ó˜qÓ Ü×"Ò"Ð#IÓJÐJð !r   r   )r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚsynopsisÚfloatÚoptParametersr   r   r   ÚstrÚ__annotations__Úlongdescr   r!   Ú__static_attributes__r   r   r   r   r      s²   ‡ ñð /€Hð ØØðBàð	
ð ØØð)ð ð	
ð ØØðð ð	
ð ØØðð ð	
ð7$€MðL %'€Hˆd�8˜C‘=Ñ!Ó&ð	€Hð˜sð  tô ÷Kr   r   Úconfigr   c                 ó¸   • [        5       nU S   Ul        U S   Ul        U S   Ul        U S   Ul        UR                  SR                  U S   5      U S   5        U$ )Nr
   r   r   r   Ú r   )r   r
   ÚkillTimeÚminRestartDelayÚmaxRestartDelayÚ
addProcessÚjoin)r/   Úss     r   ÚmakeServicer8   W   sb   € ÜÓ€Aà˜Ñ%€A„KØ˜
Ñ#€A„JØÐ0Ñ1€AÔØÐ0Ñ1€AÔà‡L�L�—‘˜& ™.Ó)¨6°&©>Ô:Ø€Hr   N)
r'   Útypingr   r   Útwisted.pythonr   Útwisted.runner.procmonr   r   r8   r   r   r   Ú<module>r<      s=   ðñ
÷ "å  Ý 1ôEKˆe�m‰mô EKðP	˜ð 	 Nõ 	r   