solnlib 5.2.0__tar.gz → 5.2.0b2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {solnlib-5.2.0 → solnlib-5.2.0b2}/PKG-INFO +1 -1
- {solnlib-5.2.0 → solnlib-5.2.0b2}/pyproject.toml +1 -1
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/__init__.py +1 -1
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/splunk_rest_client.py +10 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/LICENSE +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/_utils.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/acl.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/bulletin_rest_client.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/conf_manager.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/credentials.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/file_monitor.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/hec_config.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/log.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/modular_input/__init__.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/modular_input/checkpointer.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/modular_input/event.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/modular_input/event_writer.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/modular_input/modular_input.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/net_utils.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/orphan_process_monitor.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/pattern.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/server_info.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/splunkenv.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/time_parser.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/timer_queue.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/user_access.py +0 -0
- {solnlib-5.2.0 → solnlib-5.2.0b2}/solnlib/utils.py +0 -0
|
@@ -26,6 +26,7 @@ import os
|
|
|
26
26
|
import traceback
|
|
27
27
|
from io import BytesIO
|
|
28
28
|
from urllib.parse import quote
|
|
29
|
+
from urllib3.util.retry import Retry
|
|
29
30
|
|
|
30
31
|
from splunklib import binding, client
|
|
31
32
|
|
|
@@ -33,6 +34,7 @@ from .net_utils import validate_scheme_host_port
|
|
|
33
34
|
from .splunkenv import get_splunkd_access_info
|
|
34
35
|
|
|
35
36
|
__all__ = ["SplunkRestClient"]
|
|
37
|
+
MAX_REQUEST_RETRIES = 5
|
|
36
38
|
|
|
37
39
|
|
|
38
40
|
def _get_proxy_info(context):
|
|
@@ -98,10 +100,18 @@ def _request_handler(context):
|
|
|
98
100
|
else:
|
|
99
101
|
cert = None
|
|
100
102
|
|
|
103
|
+
retries = Retry(
|
|
104
|
+
total=MAX_REQUEST_RETRIES,
|
|
105
|
+
backoff_factor=0.3,
|
|
106
|
+
status_forcelist=[500, 502, 503, 504],
|
|
107
|
+
allowed_methods=["GET", "POST", "PUT", "DELETE"],
|
|
108
|
+
raise_on_status=False,
|
|
109
|
+
)
|
|
101
110
|
if context.get("pool_connections", 0):
|
|
102
111
|
logging.info("Use HTTP connection pooling")
|
|
103
112
|
session = requests.Session()
|
|
104
113
|
adapter = requests.adapters.HTTPAdapter(
|
|
114
|
+
max_retries=retries,
|
|
105
115
|
pool_connections=context.get("pool_connections", 10),
|
|
106
116
|
pool_maxsize=context.get("pool_maxsize", 10),
|
|
107
117
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|