omnata-plugin-runtime 0.5.0a113__py3-none-any.whl → 0.5.1a114__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 +5 -4
- {omnata_plugin_runtime-0.5.0a113.dist-info → omnata_plugin_runtime-0.5.1a114.dist-info}/METADATA +1 -1
- {omnata_plugin_runtime-0.5.0a113.dist-info → omnata_plugin_runtime-0.5.1a114.dist-info}/RECORD +5 -5
- {omnata_plugin_runtime-0.5.0a113.dist-info → omnata_plugin_runtime-0.5.1a114.dist-info}/LICENSE +0 -0
- {omnata_plugin_runtime-0.5.0a113.dist-info → omnata_plugin_runtime-0.5.1a114.dist-info}/WHEEL +0 -0
@@ -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:
|
{omnata_plugin_runtime-0.5.0a113.dist-info → omnata_plugin_runtime-0.5.1a114.dist-info}/RECORD
RENAMED
@@ -5,8 +5,8 @@ omnata_plugin_runtime/forms.py,sha256=hV6jVaizex20Pb9NxPx11TBPK-Yy8pREAnTtCxHo4Q
|
|
5
5
|
omnata_plugin_runtime/logging.py,sha256=bn7eKoNWvtuyTk7RTwBS9UARMtqkiICtgMtzq3KA2V0,3272
|
6
6
|
omnata_plugin_runtime/omnata_plugin.py,sha256=zIk8dS5m4pXsVy_2im-Cd-t1uQV9hf1seosb1T2jGGs,110880
|
7
7
|
omnata_plugin_runtime/plugin_entrypoints.py,sha256=xlPTI25N5G3l0bRFSkga98TIHM44NRaN2g7T5jSsqX0,29181
|
8
|
-
omnata_plugin_runtime/rate_limiting.py,sha256=
|
9
|
-
omnata_plugin_runtime-0.5.
|
10
|
-
omnata_plugin_runtime-0.5.
|
11
|
-
omnata_plugin_runtime-0.5.
|
12
|
-
omnata_plugin_runtime-0.5.
|
8
|
+
omnata_plugin_runtime/rate_limiting.py,sha256=DVQ_bc-mVLBkrU1PTns1MWXhHiLpSB5HkWCcdePtJ2A,25611
|
9
|
+
omnata_plugin_runtime-0.5.1a114.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
10
|
+
omnata_plugin_runtime-0.5.1a114.dist-info/METADATA,sha256=yf8uYGHInQ_N6bUEZyTgvvVodiYL0mxHtj3jy94BIhU,1888
|
11
|
+
omnata_plugin_runtime-0.5.1a114.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
12
|
+
omnata_plugin_runtime-0.5.1a114.dist-info/RECORD,,
|
{omnata_plugin_runtime-0.5.0a113.dist-info → omnata_plugin_runtime-0.5.1a114.dist-info}/LICENSE
RENAMED
File without changes
|
{omnata_plugin_runtime-0.5.0a113.dist-info → omnata_plugin_runtime-0.5.1a114.dist-info}/WHEEL
RENAMED
File without changes
|