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/worker/consumer/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib/python3.9/site-packages/celery/worker/consumer/__pycache__/mingle.cpython-39.pyc
a

��Sh�	�@s`dZddlmZddlmZddlmZdZee�Z	e	j
e	je	jZ
ZZGdd�dej
�Zd	S)
z-Worker <-> Worker Sync at startup (Bootstep).�)�	bootsteps)�
get_logger�)�Events)�MinglecsveZdZdZdZefZhd�Zd�fdd�	Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
ddd�Zdd�Zdd�Z�ZS)rz�Bootstep syncing state with neighbor workers.

    At startup, or upon consumer restart, this will:

    - Sync logical clocks.
    - Sync revoked tasks.

    >ZgcpubsubZredisZamqpFcs0|o|�|j�|_t�j|fd|i|��dS)N�without_mingle)�compatible_transport�app�enabled�super�__init__)�self�cr�kwargs��	__class__��G/usr/local/lib/python3.9/site-packages/celery/worker/consumer/mingle.pyrs���zMingle.__init__cCs:|���}|jj|jvWd�S1s,0YdS�N)Zconnection_for_read�	transportZdriver_type�compatible_transports)r
r	�connrrrr s
zMingle.compatible_transportcCs|�|�dSr)�sync)r
rrrr�start$szMingle.startcs`td�����}|rTtdtdd�|��D�����fdd�|��D�td�ntd�dS)Nzmingle: searching for neighborszmingle: sync with %s nodescSsg|]\}}|r|�qSrr)�.0�reply�valuerrr�
<listcomp>,�zMingle.sync.<locals>.<listcomp>cs"g|]\}}|r���||��qSr)�
on_node_reply)r�nodenamer�rr
rrr-s
�zmingle: sync completezmingle: all alone)�info�
send_hello�len�items)r
r�repliesrr!rr's
��
zMingle.synccCsD|jjjd|jd�}|jjj}|�|j|j	�p0i}|�
|jd�|S)Ng�?)�timeout�
connection)r	�control�inspectr(�
controller�state�revokedZhello�hostname�_data�pop)r
rr*Zour_revokedr&rrrr#3s

zMingle.send_helloc
Cshtd|�z|j|fi|��WnBty4�Yn0tyb}ztd||�WYd}~n
d}~00dS)Nz mingle: processing reply from %szmingle: sync with %s failed: %r)�debug�sync_with_node�MemoryError�	Exception�	exception)r
rr r�excrrrr:s
zMingle.on_node_replyNcKs|�||�|�||�dSr)�on_clock_event�on_revoked_received)r
r�clockr-rrrrr2CszMingle.sync_with_nodecCs"|r|jj�|�n
|jj��dSr)r	r9�adjustZforward)r
rr9rrrr7GszMingle.on_clock_eventcCs|r|jjj�|�dSr)r+r,r-�update)r
rr-rrrr8JszMingle.on_revoked_received)F)NN)�__name__�
__module__�__qualname__�__doc__�labelr�requiresrrrrrr#rr2r7r8�
__classcell__rrrrr
s		
rN)r?ZceleryrZcelery.utils.logr�eventsr�__all__r<�loggerr1r"r5Z
StartStopSteprrrrr�<module>s

Yohohohohohooho | Sanrei Aya