omnata-plugin-runtime 0.5.0a113__tar.gz → 0.5.1a114__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/src/omnata_plugin_runtime/rate_limiting.py +5 -4
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/LICENSE +0 -0
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/README.md +0 -0
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/src/omnata_plugin_runtime/omnata_plugin.py +0 -0
- {omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/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.5.
|
3
|
+
version = "0.5.1-a114"
|
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"
|
@@ -178,10 +178,9 @@ class RateLimitState(SubscriptableBaseModel):
|
|
178
178
|
[],
|
179
179
|
description="A list of timestamps where previous requests have been made, used to calculate the next request time",
|
180
180
|
)
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
)
|
181
|
+
# can't set this as a class variable because it's not serializable
|
182
|
+
# TODO: probably shouldn't mix models with functionality like this
|
183
|
+
_request_timestamps_lock: Optional[threading.Lock] = None
|
185
184
|
|
186
185
|
@field_serializer('wait_until',when_used='always')
|
187
186
|
def serialize_wait_until(self, value:Optional[datetime.datetime]) -> Optional[int]:
|
@@ -253,6 +252,8 @@ class RateLimitState(SubscriptableBaseModel):
|
|
253
252
|
You only need to use this if your HTTP requests are not automatically being
|
254
253
|
registered, which happens if http.client.HTTPConnection is not being used.
|
255
254
|
"""
|
255
|
+
if self._request_timestamps_lock is None:
|
256
|
+
self._request_timestamps_lock = threading.Lock()
|
256
257
|
with self._request_timestamps_lock:
|
257
258
|
append_time = datetime.datetime.now(datetime.timezone.utc)
|
258
259
|
if self.previous_request_timestamps is None:
|
File without changes
|
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.5.0a113 → omnata_plugin_runtime-0.5.1a114}/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
|