omnata-plugin-runtime 0.3.19a62__py3-none-any.whl → 0.3.20__py3-none-any.whl

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.
@@ -924,13 +924,8 @@ class InboundSyncRequest(SyncRequest):
924
924
  self._apply_results[stream_name] = None
925
925
  self._apply_results = {}
926
926
  # update the inbound stream record counts, so we can see progress
927
- self._plugin_message(
928
- message=PluginMessageStreamProgressUpdate(
929
- stream_total_counts=self._stream_record_counts,
930
- completed_streams=self._completed_streams,
931
- stream_errors=self._omnata_log_handler.stream_global_errors
932
- )
933
- )
927
+ self.apply_progress_updates()
928
+
934
929
  # also take care of uploading delete requests
935
930
  if hasattr(self,'_apply_results_criteria_deletes') and self._apply_results_criteria_deletes is not None:
936
931
  with self._apply_results_lock:
@@ -947,6 +942,21 @@ class InboundSyncRequest(SyncRequest):
947
942
  all_dfs = pandas.concat(results)
948
943
  #logger.info(f"applying: {all_dfs}")
949
944
  self._apply_criteria_deletes_dataframe(all_dfs)
945
+ # clear the delete requests
946
+ self._apply_results_criteria_deletes = {}
947
+
948
+ def apply_progress_updates(self):
949
+ """
950
+ Sends a message to the plugin with the current progress of the sync run.
951
+ """
952
+ # TODO: Only send them if they have changed since last time
953
+ self._plugin_message(
954
+ message=PluginMessageStreamProgressUpdate(
955
+ stream_total_counts=self._stream_record_counts,
956
+ completed_streams=self._completed_streams,
957
+ stream_errors=self._omnata_log_handler.stream_global_errors
958
+ )
959
+ )
950
960
 
951
961
  def apply_cancellation(self):
952
962
  """
@@ -210,6 +210,7 @@ class PluginEntrypoint:
210
210
  logger.info("Calling apply_results_queue")
211
211
  inbound_sync_request.apply_results_queue()
212
212
  inbound_sync_request.apply_rate_limit_state()
213
+ inbound_sync_request.apply_progress_updates()
213
214
  if inbound_sync_request.deadline_reached:
214
215
  # if we actually hit the deadline, this is flagged by the cancellation checking worker and the cancellation
215
216
  # 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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.3.19a62
3
+ Version: 0.3.20
4
4
  Summary: Classes and common runtime components for building and running Omnata Plugins
5
5
  Author: James Weakley
6
6
  Author-email: james.weakley@omnata.com
@@ -0,0 +1,12 @@
1
+ omnata_plugin_runtime/__init__.py,sha256=w63LVME5nY-hQ4BBzfacy9kvTunwqHGs8iiSPGAX2ns,1214
2
+ omnata_plugin_runtime/api.py,sha256=_N5ok5LN7GDO4J9n3yduXp3tpjmhpySY__U2baiygrs,6217
3
+ omnata_plugin_runtime/configuration.py,sha256=AY_hHBd283VHx_rU9TzUol5VTzA6PHxxTltYWV7clCg,35113
4
+ omnata_plugin_runtime/forms.py,sha256=pw_aKVsXSz47EP8PFBI3VDwdSN5IjvZxp8JTjO1V130,18421
5
+ omnata_plugin_runtime/logging.py,sha256=bn7eKoNWvtuyTk7RTwBS9UARMtqkiICtgMtzq3KA2V0,3272
6
+ omnata_plugin_runtime/omnata_plugin.py,sha256=9t17Ug94v0IdXzUNx27v_U0itUVQV3k0Tqqx5b-djwE,99609
7
+ omnata_plugin_runtime/plugin_entrypoints.py,sha256=s-SrUnXaS6FaBq1igiJhcCB3Md_a6op-dp_g1H_55QU,27736
8
+ omnata_plugin_runtime/rate_limiting.py,sha256=se6MftQI5NrVHaLb1hByPCgAESPQhkAgIG7KIU1clDU,16562
9
+ omnata_plugin_runtime-0.3.20.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
10
+ omnata_plugin_runtime-0.3.20.dist-info/METADATA,sha256=KYTr76x2AGYfw0Rrn0GyhPM_-o0i0u5Yx_Ymp0TmS44,1601
11
+ omnata_plugin_runtime-0.3.20.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
+ omnata_plugin_runtime-0.3.20.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- omnata_plugin_runtime/__init__.py,sha256=w63LVME5nY-hQ4BBzfacy9kvTunwqHGs8iiSPGAX2ns,1214
2
- omnata_plugin_runtime/api.py,sha256=_N5ok5LN7GDO4J9n3yduXp3tpjmhpySY__U2baiygrs,6217
3
- omnata_plugin_runtime/configuration.py,sha256=AY_hHBd283VHx_rU9TzUol5VTzA6PHxxTltYWV7clCg,35113
4
- omnata_plugin_runtime/forms.py,sha256=pw_aKVsXSz47EP8PFBI3VDwdSN5IjvZxp8JTjO1V130,18421
5
- omnata_plugin_runtime/logging.py,sha256=bn7eKoNWvtuyTk7RTwBS9UARMtqkiICtgMtzq3KA2V0,3272
6
- omnata_plugin_runtime/omnata_plugin.py,sha256=hygZU0EwuFmob-LAL57C_tj8Ft_OTQ81NoEZkEqHppc,99276
7
- omnata_plugin_runtime/plugin_entrypoints.py,sha256=_XgmWsrHoSshkl5Z2T27BAGVnBh4yH-8lni5sdGlSz8,27670
8
- omnata_plugin_runtime/rate_limiting.py,sha256=se6MftQI5NrVHaLb1hByPCgAESPQhkAgIG7KIU1clDU,16562
9
- omnata_plugin_runtime-0.3.19a62.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
10
- omnata_plugin_runtime-0.3.19a62.dist-info/METADATA,sha256=3XZaey5QxrU_8tdvPlXWi2OKJc3oIlyB-CUxn8bg05M,1604
11
- omnata_plugin_runtime-0.3.19a62.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
- omnata_plugin_runtime-0.3.19a62.dist-info/RECORD,,