Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /usr/local/lib/python3.9/site-packages/celery/concurrency/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib/python3.9/site-packages/celery/concurrency/__pycache__/base.cpython-39.pyc
a

��Shb�@s�dZddlZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZmZmZddlmZdd	lmZdd
lmZdZed�Zd
ddddejd
ejfdd�ZGdd�d�ZdS)zBase Execution Pool.�N)�Any�Dict)�
ExceptionInfo)�WorkerLostError)�	safe_repr)�WorkerShutdown�WorkerTerminate�reraise)�timer2)�
get_logger)�truncate)�BasePool�apply_targetzcelery.pool�c	Ks�|sin|}|r"||p|�|��z||i|��}
Wn�|yH�Yn�tyZ�Yn�ttfyp�Ynjty�}zJz tttt|��t��d�Wnty�|t	��Yn0WYd}~nd}~00||
�dS)z#Apply function within pool context.�N)
�	Exceptionrr�
BaseExceptionr	r�repr�sys�exc_infor)�target�args�kwargs�callbackZaccept_callback�pid�getpid�	propagate�	monotonic�_�ret�excrr�A/usr/local/lib/python3.9/site-packages/celery/concurrency/base.pyrs&
�&rc@seZdZdZdZdZdZejZdZ	dZ
dZdZdZ
dZdZdZd8d	d
�Zdd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd9dd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Z d)d*�Z!d+d,�Z"d:d-d.�Z#e$e%e&fd/�d0d1�Z'e(d2d3��Z)e(d4d5��Z*e(d6d7��Z+dS);r
z
Task pool.�r�TFNrcKs(||_||_||_||_||_||_dS�N)�limit�putlocks�options�forking_enable�callbacks_propagate�app)�selfr%r&r(r)r*r'rrr!�__init__IszBasePool.__init__cCsdSr$r�r+rrr!�on_startRszBasePool.on_startcCsdS)NTrr-rrr!�did_start_okUszBasePool.did_start_okcCsdSr$rr-rrr!�flushXszBasePool.flushcCsdSr$rr-rrr!�on_stop[szBasePool.on_stopcCsdSr$r)r+�looprrr!�register_with_event_loop^sz!BasePool.register_with_event_loopcOsdSr$r�r+rrrrr!�on_applyaszBasePool.on_applycCsdSr$rr-rrr!�on_terminatedszBasePool.on_terminatecCsdSr$r�r+Zjobrrr!�on_soft_timeoutgszBasePool.on_soft_timeoutcCsdSr$rr7rrr!�on_hard_timeoutjszBasePool.on_hard_timeoutcOsdSr$rr4rrr!�
maintain_poolmszBasePool.maintain_poolcCstt|��d���dS)Nz does not implement kill_job��NotImplementedError�type)r+r�signalrrr!�
terminate_jobps�zBasePool.terminate_jobcCstt|��d���dS)Nz does not implement restartr;r-rrr!�restartts�zBasePool.restartcCs|��|j|_dSr$)r1�	TERMINATE�_stater-rrr!�stopxsz
BasePool.stopcCs|j|_|��dSr$)rArBr6r-rrr!�	terminate|szBasePool.terminatecCs"t�tj�|_|��|j|_dSr$)�logger�isEnabledFor�logging�DEBUG�_does_debugr.�RUNrBr-rrr!�start�szBasePool.startcCs|j|_|��dSr$)�CLOSErB�on_closer-rrr!�close�szBasePool.closecCsdSr$rr-rrr!rM�szBasePool.on_closecKsb|sin|}|sgn|}|jrBt�d|tt|�d�tt|�d��|j|||f|j|jd�|��S)z�Equivalent of the :func:`apply` built-in function.

        Callbacks should optimally return as soon as possible since
        otherwise the thread which handles the result will get blocked.
        z&TaskPool: Apply %s (args:%s kwargs:%s)i)Zwaitforslotr))rIrE�debugrrr5r&r))r+rrrr'rrr!�apply_async�s���zBasePool.apply_async)�returncCs|jjd|jj|jd�S)z�
        Return configuration and statistics information. Subclasses should
        augment the data as required.

        :return: The returned value must be JSON-friendly.
        �:)�implementationzmax-concurrency)�	__class__�
__module__�__name__r%r-rrr!�	_get_info�s�zBasePool._get_infocCs|��Sr$)rWr-rrr!�info�sz
BasePool.infocCs|j|jkSr$)rBrJr-rrr!�active�szBasePool.activecCs|jSr$)r%r-rrr!�
num_processes�szBasePool.num_processes)NTTrN)N)NN),rVrU�__qualname__�__doc__rJrLrAr
�TimerZsignal_safeZis_greenrB�_poolrIZuses_semaphoreZtask_join_will_blockZbody_can_be_bufferr,r.r/r0r1r3r5r6r8r9r:r?r@rCrDrKrNrMrPr�strrrW�propertyrXrYrZrrrr!r
/sR�
	



r
)r\rG�osr�time�typingrrZbilliard.einforZbilliard.exceptionsrZkombu.utils.encodingrZcelery.exceptionsrrr	Zcelery.utilsr
Zcelery.utils.logrZcelery.utils.textr�__all__rErrrr
rrrr!�<module>s&�


Yohohohohohooho | Sanrei Aya