Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
lvestats
/
plugins
/
generic
/
burster
/
__pycache__
[ HOME ]
Exec
Submit
utils.cpython-311.pyc
� ֈ9h� � �� � d Z ddlZddlZddlmZmZmZmZmZm Z ddl mZ e d� � Zdee de d eeed f fd�Zdee d ee fd �Zded eeeef f fd�Zd� ZdS )zHUtility stuff which is not directly related to the plugin domain itself.� N)�Any�Callable� Generator�Iterator�Iterable�TypeVar� )�logger�_T�iterable�n�return.c # �� K � |dk rt d� � �t | � � }t t j ||� � � � x}r*|V � t t j ||� � � � x}�(dS dS )zkbatched('ABCDEFG', 3) --> ABC DEF G Batch data into tuples of length n. The last batch may be shorter.r zn must be at least oneN)� ValueError�iter�tuple� itertools�islice)r r �it�batchs ��/builddir/build/BUILDROOT/lve-stats-4.2.13-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/plugins/generic/burster/utils.py�batchedr s� � � � � �1�u�u��1�2�2�2� �h���B���)�"�a�0�0�1�1� 1�%� ����� ��)�"�a�0�0�1�1� 1�%� � � � � � �upstreamc # �N K � | D ]}|}|V � � |V � n# t $ r Y d S w xY w��N)� NameError)r �item�lasts r �repeast_lastr sa � � � �� � ����� � � � �� ��J�J�J�J��� � � ��F�F� ����s � � #�#�funcc �F � � t j � � � � fd�� � }|S )Nc �B �� �| i |��}|� d � � |S r )�send)�args�kwargs�gr! s �r �wrapperzbootstrap_gen.<locals>.wrapper+ s+ �� ��D�$�!�&�!�!�� ���t�����r �� functools�wraps�r! r( s ` r � bootstrap_genr- * s8 �� ��_�T���� � � � ��� �Nr c �F � � t j � � � � fd�� � }|S )Nc �h �� �| i |��S # t $ r t j d�j � � � w xY w)NzFunction %s failed!)� Exceptionr � exception�__name__)r% r&