Server : nginx/1.24.0 System : Linux ip-172-31-33-48 6.14.0-1011-aws #11~24.04.1-Ubuntu SMP Fri Aug 1 02:07:25 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE Directory : /lib/python3/dist-packages/botocore/retries/__pycache__/ |
Upload File : |
� P��e� � �L � d Z ddlZddlZddlmZ G d� d� Z G d� d� Zy)zEThis module implements token buckets used for client side throttling.� N)�CapacityNotAvailableErrorc � � e Zd Zd� Zd� Zd� Zy)�Clockc � � y �N� ��selfs �9/usr/lib/python3/dist-packages/botocore/retries/bucket.py�__init__zClock.__init__ s � �� c �. � t j |� y r )�time�sleep�r �amounts r r zClock.sleep s � �� � �6�r c �* � t j � S r )r r s r �current_timezClock.current_time s � ��y�y�{�r N)�__name__� __module__�__qualname__r r r r r r r r s � � ��r r c � � e Zd ZdZefd�Zed� � Zej d� � Zed� � Zed� � Z dd�Z d� Zd � Zd � Z y) �TokenBucketg �?c �� � d | _ d | _ d| _ || _ d | _ || _ t j � | _ t j | j � | _ || _ y )Nr )� _fill_rate� _max_capacity�_current_capacity�_clock�_last_timestamp� _min_rate� threading�Lock�_lock� Condition�_new_fill_rate_condition�max_rate)r r&