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__/tasks.cpython-39.pyc
a

��Sh�
�@sxdZddlmZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
d	Ze	e�ZejZGd
d�dej�ZdS)
zWorker Task Consumer Bootstep.�)�annotations)�QoS�
ignore_errors)�	bootsteps)�
get_logger)�detect_quorum_queues�)�Mingle)�TaskscsTeZdZdZefZ�fdd�Zdd�Zdd�Zdd	�Z	d
d�Z
dd
�dd�Z�ZS)r
z,Bootstep starting the task message consumer.cs$d|_|_t�j|fi|��dS)N)�
task_consumer�qos�super�__init__)�self�c�kwargs��	__class__��F/usr/local/lib/python3.9/site-packages/celery/worker/consumer/tasks.pyrszTasks.__init__cs^���|�����jj�d�j���jjj�j�j	d��_
��fdd�}t|�j��_dS)zStart task consumer.r)�on_decode_errorcs�jj|�d�S)N)�prefetch_countZapply_global)rr)r�r�
qos_globalrr�set_prefetch_count,s�z'Tasks.start.<locals>.set_prefetch_countN)
Zupdate_strategiesr�
connectionZdefault_channelZ	basic_qosZinitial_prefetch_count�appZamqpZTaskConsumerrrrr)rrrrrr�starts
��zTasks.startcCs |jrtd�t||jj�dS)zStop task consumer.zCanceling task consumer...N)r�debugr�cancel�rrrrr�stop3sz
Tasks.stopcCs0|jr,|�|�td�t||jj�d|_dS)zShutdown task consumer.zClosing consumer channel...N)rr!rr�closer rrr�shutdown9s

zTasks.shutdowncCsd|jr|jjndiS)zReturn task consumer info.rzN/A)r�valuer rrr�infoAsz
Tasks.info�bool)�returncCs@|jj}|jjjr<t|j|jjj�\}}|r<d}t�	d�|S)z�Determine if global QoS should be applied.

        Additional information:
            https://www.rabbitmq.com/docs/consumer-prefetch
            https://www.rabbitmq.com/docs/quorum-queues#global-qos
        Fz5Global QoS is disabled. Prefetch count in now static.)
rZqos_semantics_matches_specr�confZworker_detect_quorum_queuesr�	transportZdriver_type�loggerr%)rrrZusing_quorum_queues�qnamerrrrEs



zTasks.qos_global)
�__name__�
__module__�__qualname__�__doc__r	�requiresrrr!r#r%r�
__classcell__rrrrr
sr
N)r/�
__future__rZkombu.commonrrZceleryrZcelery.utils.logrZcelery.utils.quorum_queuesrZmingler	�__all__r,r*rZ
StartStopStepr
rrrr�<module>s

Yohohohohohooho | Sanrei Aya