📂 Advanced File Manager
Multi-Root Navigation System
⚡ Quick Jump
Server (/)
Home (/home)
Var_www (/var/www)
Current (/home4/shelley/public_html/shelleycutler.com/wp-content/mu-plugins)
📍 Go
⬆ Ke Atas
🏠 Root Server
🏠 Root App
🔄 Refresh
📀 /
›
usr
›
lib
›
python3.9
›
site-packages
›
oci
›
retry
›
📁 __pycache__
📍
Lokasi:
/usr/lib/python3.9/site-packages/oci/retry/__pycache__
💾
Free:
45.8 GB
⚠️ Direktori ini
tidak writable
.
✏️ Mengedit: retry.cpython-39.pyc
a ���f�f � @ s� d dl mZ ddlmZ ddlmZ ddlmZmZmZ ddl Z dZ d Zd ZdZ e eee gZG dd � d e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZdS )� )�ServiceError� )�retry_checkers)�retry_sleep_utils� )�%should_record_body_position_for_retry�record_body_position_for_rewind�rewind_bodyNZfull_jitterZequal_jitterZ"full_jitter_with_equal_on_throttle�decorrelated_jitterc @ sT e Zd ZdZdd� Zddd�Zdd� Zdd d�Zdd � Zdd� Z dd� Z dd� ZdS )�RetryStrategyBuildera A class which can build a retry strategy based on provided criteria. Criteria can be provided at construction time or afterwards via using the ``add_*`` (to add/enable criteria) and ``no_*`` (to disable/remove criteria) methods. Trying to build a strategy when there are no enabled checks will result in a :py:class:`oci.retry.NoneRetryStrategy` being produced. This builder is intended as a convenience, but callers are also able to bypass this and construct retry strategies directly. c K s� |� dd�| _|� dd�| _|� dd�| _|� dd�| _|� dd�| _|� d tj�| _|� d d�| _ |� dd�| _ |� d d�| _|� dd�| _|� dd�| _ t| _d|v r�|d tvr�td�t���n |d | _dS )a� Creates a new builder and initializes it based on any provided parameters. :param Boolean max_attempts_check (optional): Whether to enable a check that we don't exceed a certain number of attempts. If not provided this defaults to True (with a default max-attempts = 8) :param Boolean service_error_check (optional): Whether to enable a check that will retry on connection errors, timeouts and service errors which match given combinations of HTTP statuses and textual error codes. If not provided this defaults to True (i.e. this check will be done) :param Boolean total_elapsed_time_check (optional): Whether to enable a check that we don't exceed a certain amount of time when retrying. This is intended for scenarios such as "keep retrying for 5 minutes". If not provided this defaults to True (i.e. this check will be done with the total elapsed time of 600 seconds) :param int max_attempts (optional): If we are checking that we don't exceed a certain number of attempts, what that number of attempts should be. This only applies if we are performing a check on the maximum number of attempts and will be ignored otherwise. If we are performing a check on the maximum number of attempts and this value is not provided, we will default to a maximum of 8 attempts :param int total_elapsed_time_seconds (optional): If we are checking that we don't exceed a certain amount of time when retrying, what that amount of time should be (in seconds). This only applies if we are performing a check on the total elapsed time and will be ignored otherwise. If we are performing a check on the total elapsed time and this value is not provided, we will default to 600 seconds (10 minutes) :param dict service_error_retry_config (optional): If we are checking on service errors, we can configure what HTTP statuses (e.g. 429) to retry on and, optionally, whether the textual code (e.g. TooManyRequests) matches a given value. This is a dictionary where the key is an integer representing the HTTP status, and the value is a list(str) where we will test if the textual code in the service error is a member of the list. If an empty list is provided, then only the numeric status is checked for retry purposes. If we are performing a check on service errors and this value is not provided, then by default we will retry on HTTP 409/IncorrectState, 429's (throttles) without any textual code check. :param Boolean service_error_retry_on_any_5xx (optional): If we are checking on service errors, whether to retry on any HTTP 5xx received from the service. If we are performing a check on service errors and this value is not provided, it defaults to True (retry on any 5xx except 501) :param int retry_base_sleep_time_seconds (optional): For exponential backoff with jitter, the base time to use in our retry calculation in seconds. If not provided, this value defaults to 1 second :param int retry_exponential_growth_factor (optional): For exponential backoff with jitter, the exponent which we will raise to the power of the number of attempts. If not provided, this value defaults to 2 :param int retry_max_wait_between_calls_seconds (optional): For exponential backoff with jitter, the maximum amount of time to wait between retries. If not provided, this value defaults to 30 seconds :param int decorrelated_jitter (optional): The random De-correlated jitter value in seconds (default 1) to be used when using the backoff_type BACKOFF_DECORRELATED_JITTER_VALUE :param str backoff_type (optional): The type of backoff we want to do (e.g. full jitter). The convenience constants in this retry module: ``BACKOFF_DECORRELATED_JITTER_VALUE``, ``BACKOFF_FULL_JITTER_VALUE``,`BACKOFF_EQUAL_JITTER_VALUE``, and ``BACKOFF_FULL_JITTER_EQUAL_ON_THROTTLE_VALUE`` can be used as values here. If no value is specified then the value ``BACKOFF_DECORRELATED_JITTER_VALUE`` will be used. This will use exponential backoff and a random de-correlated jitter. �max_attempts_checkT�service_error_check�total_elapsed_time_check�max_attempts� �total_elapsed_time_seconds�X �service_error_retry_config�service_error_retry_on_any_5xx�retry_base_sleep_time_secondsr �retry_exponential_growth_factorr �$retry_max_wait_between_calls_seconds� r �backoff_typez<Unrecognized backoff type supplied. Recognized types are: {}N)�getr r r r r r ZRETRYABLE_STATUSES_AND_CODESr r r r r r �!BACKOFF_DECORRELATED_JITTER_VALUEr �VALID_BACKOFF_TYPES� ValueError�format��self�kwargs� r"