omnata-plugin-runtime 0.11.0a305__tar.gz → 0.11.0a307__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.0a305 → omnata_plugin_runtime-0.11.0a307}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/src/omnata_plugin_runtime/omnata_plugin.py +24 -16
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/LICENSE +0 -0
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/README.md +0 -0
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/src/omnata_plugin_runtime/json_schema.py +0 -0
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.11.0a305 → omnata_plugin_runtime-0.11.0a307}/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-a307"
|
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"
|
@@ -1205,23 +1205,30 @@ class InboundSyncRequest(SyncRequest):
|
|
1205
1205
|
"""
|
1206
1206
|
Sends a message to the plugin with the current progress of the sync run, if it has changed since last time.
|
1207
1207
|
"""
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1208
|
+
with self._apply_results_lock:
|
1209
|
+
new_progress_update = PluginMessageStreamProgressUpdate(
|
1210
|
+
stream_total_counts=self._stream_record_counts,
|
1211
|
+
# records could have been marked as completed, but still have results to apply
|
1212
|
+
completed_streams=[s for s in self._completed_streams if s not in self._apply_results or self._apply_results[s] is None],
|
1213
|
+
stream_errors=self._omnata_log_handler.stream_global_errors,
|
1214
|
+
total_records_estimate=self._total_records_estimate
|
1215
|
+
)
|
1216
|
+
if self._last_stream_progress_update is None or new_progress_update != self._last_stream_progress_update:
|
1217
|
+
result = self._plugin_message(
|
1218
|
+
message=new_progress_update,
|
1219
|
+
ignore_errors=ignore_errors
|
1220
|
+
)
|
1221
|
+
if result is None:
|
1222
|
+
return False
|
1223
|
+
self._last_stream_progress_update = new_progress_update
|
1224
|
+
else:
|
1225
|
+
completed_streams_awaiting_results_upload = [
|
1226
|
+
s for s in self._completed_streams if s in self._apply_results and self._apply_results[s] is not None
|
1227
|
+
]
|
1228
|
+
for completed_stream_awaiting_results_upload in completed_streams_awaiting_results_upload:
|
1229
|
+
logger.debug(
|
1230
|
+
f"Stream {completed_stream_awaiting_results_upload} is marked as completed but awaiting upload of {len(self._apply_results[completed_stream_awaiting_results_upload])} results"
|
1221
1231
|
)
|
1222
|
-
if result is None:
|
1223
|
-
return False
|
1224
|
-
self._last_stream_progress_update = new_progress_update
|
1225
1232
|
return True
|
1226
1233
|
|
1227
1234
|
def apply_cancellation(self):
|
@@ -1347,6 +1354,7 @@ class InboundSyncRequest(SyncRequest):
|
|
1347
1354
|
Marks a stream as completed, this is called automatically per stream when using @managed_inbound_processing.
|
1348
1355
|
If @managed_inbound_processing is not used, call this whenever a stream has finished recieving records.
|
1349
1356
|
"""
|
1357
|
+
logger.debug(f"Marking stream {stream_name} as completed locally")
|
1350
1358
|
self._completed_streams.append(stream_name)
|
1351
1359
|
# dedup just in case it's called twice
|
1352
1360
|
self._completed_streams = list(set(self._completed_streams))
|
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
|
File without changes
|