omnata-plugin-runtime 0.4.6a102__tar.gz → 0.4.6a103__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/src/omnata_plugin_runtime/rate_limiting.py +8 -3
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/LICENSE +0 -0
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/README.md +0 -0
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/src/omnata_plugin_runtime/omnata_plugin.py +0 -0
- {omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "omnata-plugin-runtime"
|
3
|
-
version = "0.4.6-
|
3
|
+
version = "0.4.6-a103"
|
4
4
|
description = "Classes and common runtime components for building and running Omnata Plugins"
|
5
5
|
authors = ["James Weakley <james.weakley@omnata.com>"]
|
6
6
|
readme = "README.md"
|
@@ -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)
|
File without changes
|
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.4.6a102 → omnata_plugin_runtime-0.4.6a103}/src/omnata_plugin_runtime/api.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|