omnata-plugin-runtime 0.11.0a302__tar.gz → 0.11.0a304__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.11.0a302 → omnata_plugin_runtime-0.11.0a304}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/src/omnata_plugin_runtime/omnata_plugin.py +4 -4
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/src/omnata_plugin_runtime/plugin_entrypoints.py +5 -0
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/LICENSE +0 -0
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/README.md +0 -0
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/src/omnata_plugin_runtime/json_schema.py +0 -0
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.11.0a302 → omnata_plugin_runtime-0.11.0a304}/src/omnata_plugin_runtime/rate_limiting.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "omnata-plugin-runtime"
|
3
|
-
version = "0.11.0-
|
3
|
+
version = "0.11.0-a304"
|
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"
|
@@ -1185,18 +1185,18 @@ class InboundSyncRequest(SyncRequest):
|
|
1185
1185
|
query_id: Optional[str] = None
|
1186
1186
|
) -> str:
|
1187
1187
|
binding_values = []
|
1188
|
-
|
1188
|
+
select_clauses = []
|
1189
1189
|
|
1190
1190
|
with self._snowflake_query_lock:
|
1191
1191
|
if query_id is None:
|
1192
1192
|
query_id = self._get_query_id_for_now()
|
1193
1193
|
for stream_name, latest_state in stream_states_for_upload.items():
|
1194
1194
|
binding_values.extend([stream_name, query_id, json.dumps(latest_state)])
|
1195
|
-
|
1196
|
-
f"
|
1195
|
+
select_clauses.append(
|
1196
|
+
f"select ?, ?, PARSE_JSON(?)"
|
1197
1197
|
)
|
1198
1198
|
final_query = f"""INSERT INTO {self.state_register_table_name} (STREAM_NAME, QUERY_ID, STATE_VALUE)
|
1199
|
-
|
1199
|
+
{' union all '.join(select_clauses)}"""
|
1200
1200
|
self._session.sql(final_query, binding_values).collect()
|
1201
1201
|
|
1202
1202
|
def apply_progress_updates(self, ignore_errors:bool = True):
|
@@ -282,6 +282,11 @@ class PluginEntrypoint:
|
|
282
282
|
# token is set. We throw it here as an error since that's currently how it flows back to the engine with a DELAYED state
|
283
283
|
raise DeadlineReachedException()
|
284
284
|
finally:
|
285
|
+
# try to upload any remaining results
|
286
|
+
try:
|
287
|
+
inbound_sync_request.apply_results_queue()
|
288
|
+
except Exception as e:
|
289
|
+
logger.warning(f"Error uploading remaining results: {str(e)}", exc_info=True)
|
285
290
|
# cancel the thread so we don't leave anything hanging around and cop a nasty error
|
286
291
|
try:
|
287
292
|
inbound_sync_request._thread_cancellation_token.set() # pylint: disable=protected-access
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|