HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/lib/fm-agent/library/__pycache__/result_queue.cpython-39.pyc
a

��i��@sGdd�de�ZdS)c@sTeZdZdZddd�Zdd�Zdd�Zdd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�ResultQueuez�If the aggregator can't be reached for some reason, we want
    to still keep calculating results and store them locally until we can reach the agg
    again.NcCs6g|_||_|jdurd|_||_|jdur2d|_dS)Ni�Ii')�data�queue_max_results�queue_batch_size)�selfrr�r�)/usr/lib/fm-agent/library/result_queue.py�__init__
s

zResultQueue.__init__cCs|j�d�dS�N��r�pop�rrrrrszResultQueue.popcCs|j��dS�Nrr
rrr�
pop_latestszResultQueue.pop_latestcCsZ|dur|j}t|j�|kr*|j}g|_n,t|j�|}|j|d�}|jd|�|_|Sr)r�lenr)r�chunk�result�xrrr�pop_resultsszResultQueue.pop_resultscCs(t|j�|jkr|��|j�|�dSr)rrrr�append)rrrrr�push*szResultQueue.pushcCsbt|�t|j�|jkr&|j�|�n8|jt|j�}t|�|}|j|d�|_|j�|�dSr)rrr�extend)r�resultsZ
free_spaceZremovalrrr�update/szResultQueue.updatecCst|j�dkSr	�rrr
rrr�isEmpty9szResultQueue.isEmptycCs
t|j�Srrr
rrr�queueLength<szResultQueue.queueLength)NN)N)�__name__�
__module__�__qualname__�__doc__rrrrrrrrrrrrrs
	

rN)�objectrrrrr�<module>�