omnata-plugin-runtime 0.4.6a102__py3-none-any.whl → 0.4.6a103__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- omnata_plugin_runtime/rate_limiting.py +8 -3
- {omnata_plugin_runtime-0.4.6a102.dist-info → omnata_plugin_runtime-0.4.6a103.dist-info}/METADATA +1 -1
- {omnata_plugin_runtime-0.4.6a102.dist-info → omnata_plugin_runtime-0.4.6a103.dist-info}/RECORD +5 -5
- {omnata_plugin_runtime-0.4.6a102.dist-info → omnata_plugin_runtime-0.4.6a103.dist-info}/LICENSE +0 -0
- {omnata_plugin_runtime-0.4.6a102.dist-info → omnata_plugin_runtime-0.4.6a103.dist-info}/WHEEL +0 -0
@@ -354,10 +354,15 @@ class RetryWithLogging(Retry):
|
|
354
354
|
"""
|
355
355
|
Adding extra logs before making a retry request
|
356
356
|
"""
|
357
|
-
def __init__(self, *args: Any,
|
358
|
-
self.thread_cancellation_token =
|
357
|
+
def __init__(self, *args: Any, **kwargs: Any) -> Any:
|
358
|
+
self.thread_cancellation_token:Optional[threading.Event] = None
|
359
359
|
return super().__init__(*args, **kwargs)
|
360
360
|
|
361
|
+
def new(self, **kw):
|
362
|
+
new_retry = super().new(**kw)
|
363
|
+
new_retry.thread_cancellation_token = self.thread_cancellation_token
|
364
|
+
return new_retry
|
365
|
+
|
361
366
|
def sleep_for_retry(self, response=None):
|
362
367
|
retry_after = self.get_retry_after(response)
|
363
368
|
if retry_after:
|
@@ -406,13 +411,13 @@ class RateLimitedSession(requests.Session):
|
|
406
411
|
self.statuses_to_include = statuses_to_include
|
407
412
|
|
408
413
|
retry_strategy = RetryWithLogging(
|
409
|
-
thread_cancellation_token=thread_cancellation_token,
|
410
414
|
total=max_retries,
|
411
415
|
backoff_factor=backoff_factor,
|
412
416
|
status_forcelist=statuses_to_include,
|
413
417
|
allowed_methods=["HEAD", "GET", "OPTIONS", "POST", "PUT", "DELETE"],
|
414
418
|
respect_retry_after_header=respect_retry_after_header
|
415
419
|
)
|
420
|
+
retry_strategy.thread_cancellation_token = thread_cancellation_token
|
416
421
|
adapter = HTTPAdapter(max_retries=retry_strategy)
|
417
422
|
self.mount("https://", adapter)
|
418
423
|
self.mount("http://", adapter)
|
{omnata_plugin_runtime-0.4.6a102.dist-info → omnata_plugin_runtime-0.4.6a103.dist-info}/RECORD
RENAMED
@@ -5,8 +5,8 @@ omnata_plugin_runtime/forms.py,sha256=pw_aKVsXSz47EP8PFBI3VDwdSN5IjvZxp8JTjO1V13
|
|
5
5
|
omnata_plugin_runtime/logging.py,sha256=bn7eKoNWvtuyTk7RTwBS9UARMtqkiICtgMtzq3KA2V0,3272
|
6
6
|
omnata_plugin_runtime/omnata_plugin.py,sha256=9ZXKoQTyRV_Yzz_e6wEw7rJtt8YDCNrGT0F0tg7Fecc,108571
|
7
7
|
omnata_plugin_runtime/plugin_entrypoints.py,sha256=JAGEdVcy9QEXv7TO5zt7co64LTP8nqGusOc0sJG9GtU,29149
|
8
|
-
omnata_plugin_runtime/rate_limiting.py,sha256=
|
9
|
-
omnata_plugin_runtime-0.4.
|
10
|
-
omnata_plugin_runtime-0.4.
|
11
|
-
omnata_plugin_runtime-0.4.
|
12
|
-
omnata_plugin_runtime-0.4.
|
8
|
+
omnata_plugin_runtime/rate_limiting.py,sha256=27_sgEkD7kmQlfSF3IaM09Hs8MA5tXuacVUOFR4zwC0,23454
|
9
|
+
omnata_plugin_runtime-0.4.6a103.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
10
|
+
omnata_plugin_runtime-0.4.6a103.dist-info/METADATA,sha256=0nG3b5kY7pgFtBtoVR4fxLIzxlM12MJjiZ6vFD4HyIc,1642
|
11
|
+
omnata_plugin_runtime-0.4.6a103.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
12
|
+
omnata_plugin_runtime-0.4.6a103.dist-info/RECORD,,
|
{omnata_plugin_runtime-0.4.6a102.dist-info → omnata_plugin_runtime-0.4.6a103.dist-info}/LICENSE
RENAMED
File without changes
|
{omnata_plugin_runtime-0.4.6a102.dist-info → omnata_plugin_runtime-0.4.6a103.dist-info}/WHEEL
RENAMED
File without changes
|