omnata-plugin-runtime 0.2.24__tar.gz → 0.2.26__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.
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/plugin_entrypoints.py +5 -5
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/rate_limiting.py +1 -1
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/LICENSE +0 -0
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/README.md +0 -0
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/omnata_plugin.py +0 -0
@@ -98,6 +98,9 @@ class PluginEntrypoint:
|
|
98
98
|
)
|
99
99
|
api_limits = list(all_api_limits_by_category.values())
|
100
100
|
return_dict = {}
|
101
|
+
logger.info(
|
102
|
+
f"Rate limits state: {json.dumps(request.rate_limits_state, default=pydantic.json.pydantic_encoder)}"
|
103
|
+
)
|
101
104
|
(rate_limit_state_all, rate_limit_state_this_branch) = RateLimitState.collapse(request.rate_limits_state,request.sync_id, request.sync_branch_name)
|
102
105
|
# if any endpoint categories have no state, give them an empty state
|
103
106
|
for api_limit in api_limits:
|
@@ -109,9 +112,6 @@ class PluginEntrypoint:
|
|
109
112
|
rate_limit_state_this_branch[api_limit.endpoint_category] = RateLimitState(
|
110
113
|
wait_until=None, previous_request_timestamps=None
|
111
114
|
)
|
112
|
-
logger.info(
|
113
|
-
f"Rate limits state: {json.dumps(request.rate_limits_state, default=pydantic.json.pydantic_encoder)}"
|
114
|
-
)
|
115
115
|
|
116
116
|
if request.sync_direction == "outbound":
|
117
117
|
parameters = OutboundSyncConfigurationParameters(
|
@@ -133,7 +133,7 @@ class PluginEntrypoint:
|
|
133
133
|
results_schema_name=request.results_schema_name,
|
134
134
|
results_table_name=request.results_table_name,
|
135
135
|
plugin_instance=self._plugin_instance,
|
136
|
-
api_limits=
|
136
|
+
api_limits=api_limits,
|
137
137
|
rate_limit_state_all=rate_limit_state_all,
|
138
138
|
rate_limit_state_this_sync_and_branch=rate_limit_state_this_branch,
|
139
139
|
run_deadline=datetime.datetime.now() + datetime.timedelta(hours=4),
|
@@ -168,7 +168,7 @@ class PluginEntrypoint:
|
|
168
168
|
results_schema_name=request.results_schema_name,
|
169
169
|
results_table_name=request.results_table_name,
|
170
170
|
plugin_instance=self._plugin_instance,
|
171
|
-
api_limits=
|
171
|
+
api_limits=api_limits,
|
172
172
|
rate_limit_state_all=rate_limit_state_all,
|
173
173
|
rate_limit_state_this_sync_and_branch=rate_limit_state_this_branch,
|
174
174
|
run_deadline=datetime.datetime.now() + datetime.timedelta(hours=4),
|
@@ -173,7 +173,7 @@ class RateLimitState(SubscriptableBaseModel):
|
|
173
173
|
"""
|
174
174
|
if other.wait_until is not None and (self.wait_until is None or other.wait_until > self.wait_until):
|
175
175
|
self.wait_until = other.wait_until
|
176
|
-
if len(other.previous_request_timestamps) > 0:
|
176
|
+
if other.previous_request_timestamps is not None and len(other.previous_request_timestamps) > 0:
|
177
177
|
self.previous_request_timestamps.extend(other.previous_request_timestamps)
|
178
178
|
self.previous_request_timestamps.sort(reverse=True) # they should be sorted newest to oldest
|
179
179
|
|
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/__init__.py
RENAMED
File without changes
|
{omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/api.py
RENAMED
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/forms.py
RENAMED
File without changes
|
{omnata_plugin_runtime-0.2.24 → omnata_plugin_runtime-0.2.26}/src/omnata_plugin_runtime/logging.py
RENAMED
File without changes
|
File without changes
|