omnata-plugin-runtime 0.11.0a307__tar.gz → 0.11.0a309__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.11.0a307
3
+ Version: 0.11.0a309
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "omnata-plugin-runtime"
3
- version = "0.11.0-a307"
3
+ version = "0.11.0-a309"
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"
@@ -1221,14 +1221,13 @@ class InboundSyncRequest(SyncRequest):
1221
1221
  if result is None:
1222
1222
  return False
1223
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"
1231
- )
1224
+ completed_streams_awaiting_results_upload = [
1225
+ s for s in self._completed_streams if s in self._apply_results and self._apply_results[s] is not None
1226
+ ]
1227
+ if len(completed_streams_awaiting_results_upload) > 0:
1228
+ logger.debug(
1229
+ f"Streams marked as completed but awaiting upload: {', '.join(completed_streams_awaiting_results_upload)}"
1230
+ )
1232
1231
  return True
1233
1232
 
1234
1233
  def apply_cancellation(self):
@@ -1355,9 +1354,10 @@ class InboundSyncRequest(SyncRequest):
1355
1354
  If @managed_inbound_processing is not used, call this whenever a stream has finished recieving records.
1356
1355
  """
1357
1356
  logger.debug(f"Marking stream {stream_name} as completed locally")
1358
- self._completed_streams.append(stream_name)
1359
- # dedup just in case it's called twice
1360
- self._completed_streams = list(set(self._completed_streams))
1357
+ with self._apply_results_lock:
1358
+ self._completed_streams.append(stream_name)
1359
+ # dedup just in case it's called twice
1360
+ self._completed_streams = list(set(self._completed_streams))
1361
1361
 
1362
1362
  def set_stream_record_count(self, stream_name: str, count: int):
1363
1363
  """