HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/local/lib/python3.9/site-packages/kombu/__pycache__/simple.cpython-39.pyc
a

X>h��@s�dZddlmZddlZddlmZddlmZddlm	Z	ddl
mZdd	lm
Z
mZdd
lmZertddlmZdZGd
d�d�ZGdd�de�ZGdd�de�ZdS)zSimple messaging interface.�)�annotationsN)�deque)�Empty)�	monotonic)�
TYPE_CHECKING�)�entity�	messaging)�
maybe_channel)�
TracebackType)�SimpleQueue�SimpleBufferc@s�eZdZeZdZdd�Zddddd�d	d
�Zd#dd�Zd$dd�Zdd�Z	d%dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd �Zd!d"�ZeZdS)&�
SimpleBaseFcCs|S�N���selfrr�6/usr/local/lib/python3.9/site-packages/kombu/simple.py�	__enter__szSimpleBase.__enter__ztype[BaseException] | NonezBaseException | NonezTracebackType | None�None)�exc_type�exc_val�exc_tb�returncCs|��dSr)�close)rrrrrrr�__exit__szSimpleBase.__exit__cCsDt|�|_||_||_||_|jjd|_t�|_|j�	|j
�dS)Nr)r
�channel�producer�consumer�no_ack�queues�queuer�bufferZregister_callback�_receive)rrrrrrrr�__init__#s
zSimpleBase.__init__TNcCs�|s|��S|��t�}|}|jr.|j��S|durF|dkrF|���z|jjjj	|d�Wnt
jyx|���Yn0|durt�|}||}qdS)Ng)�timeout)�
get_nowait�_consumerr"�popleftrr�
connection�clientZdrain_events�socketr%)r�blockr%Z
time_start�	remaining�elapsedrrr�get,s 

zSimpleBase.getcCs&|jj|j|jjd�}|s"|���|S)N)r�accept)r!r/rrr0r)r�mrrrr&NszSimpleBase.get_nowaitcKs"|jj|f||||d�|��dS)N)�
serializer�routing_key�headers�compression)r�publish)r�messager2r4r5r3�kwargsrrr�putTs
��zSimpleBase.putcCs
|j��Sr)r�purgerrrr�clear]szSimpleBase.clearcCs|jjdd�\}}}|S)NT)Zpassive)r!Z
queue_declare)r�_�sizerrr�qsize`szSimpleBase.qsizecCs|j��dSr)r�cancelrrrrrdszSimpleBase.closecCs|j�|�dSr)r"�append)rZmessage_datar7rrrr#gszSimpleBase._receivecCs |js|jj|jd�d|_dS)N)rT)�
_consumingrZconsumerrrrrr'jszSimpleBase._consumecCs|��S)z`len(self) -> self.qsize()`.)r>rrrr�__len__oszSimpleBase.__len__cCsdS)NTrrrrr�__bool__sszSimpleBase.__bool__)F)TN)NNNN)�__name__�
__module__�__qualname__rrArrr$r/r&r9r;r>rr#r'rBrC�__nonzero__rrrrrs$
	
"�
	rcs6eZdZdZdZiZiZddiZd�fdd�	Z�Z	S)	rz!Simple API for persistent queues.F�type�directNc
s�|}
t|jfi|pi��}t|jfi|p*i��}t|jfi|p@i��}|durT|j}t|
tj�s�tj|fi|��}tj|||fd|i|��}
|}n|
j	}|
j
}tj||
|	d�}
tj
|||||d�}t��|||
|�dS)NZqueue_arguments)r0)r2r3r5)�dict�
queue_opts�
queue_args�
exchange_optsr�
isinstancer�QueueZExchange�exchanger3r	ZConsumerZProducer�superr$)rr�namerrKrLrMr2r5r0r!rPr3rr��	__class__rrr$�s2���
�zSimpleQueue.__init__)NNNNNNN)
rDrErF�__doc__rrKrLrMr$�
__classcell__rrrSrrxs�rc@s*eZdZdZdZddd�Zdddd�ZdS)r
z Simple API for ephemeral queues.TF)�durable�auto_deleteZ	transient)rWZ
delivery_moderXN)rDrErFrUrrKrMrrrrr
�s��r
)rU�
__future__rr+�collectionsrr!r�timer�typingr�rr	r)r
�typesr�__all__rrr
rrrr�<module>sd#