omnata-plugin-runtime 0.3.26__py3-none-any.whl → 0.3.27__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.
@@ -289,7 +289,7 @@ class SyncRequest(ABC):
289
289
  self.deadline_reached = True
290
290
  self.apply_deadline_reached() # pylint: disable=protected-access
291
291
  return
292
-
292
+ is_cancelled:bool = False
293
293
  with self._snowflake_query_lock:
294
294
  try:
295
295
  # this is not ideal, but "Bind variable in stored procedure is not supported yet"
@@ -297,11 +297,11 @@ class SyncRequest(ABC):
297
297
  f"call {self._source_app_name}.API.PLUGIN_CANCELLATION_CHECK({self._run_id})"
298
298
  ).collect()
299
299
  cancellation_result = handle_proc_result(query_result)
300
- is_cancelled: bool = cancellation_result["is_cancelled"]
301
- if is_cancelled:
302
- self.apply_cancellation()
300
+ is_cancelled = cancellation_result["is_cancelled"]
303
301
  except Exception as e:
304
302
  logger.error(f"Error checking cancellation: {e}")
303
+ if is_cancelled:
304
+ self.apply_cancellation()
305
305
  cancellation_token.wait(20)
306
306
  logger.info("cancel checking worker exiting")
307
307
 
@@ -1029,7 +1029,7 @@ class InboundSyncRequest(SyncRequest):
1029
1029
  # flatten
1030
1030
  all_dfs:List[pandas.DataFrame] = [x for sublist in all_df_lists for x in sublist]
1031
1031
  combined_length = sum([len(x) for x in all_dfs])
1032
- # first, don't both if the count is less than 10000, since it's unlikely to be even close
1032
+ # first, don't bother if the count is less than 10000, since it's unlikely to be even close
1033
1033
  if combined_length > 10000:
1034
1034
  if sum([x.memory_usage(index=True).sum() for x in all_dfs]) > 200000000:
1035
1035
  logger.info(f"Applying results queue immediately due to combined dataframe size")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.3.26
3
+ Version: 0.3.27
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
@@ -3,10 +3,10 @@ omnata_plugin_runtime/api.py,sha256=_N5ok5LN7GDO4J9n3yduXp3tpjmhpySY__U2baiygrs,
3
3
  omnata_plugin_runtime/configuration.py,sha256=7cMekoY8CeZAJHpASU6tCMidF55Hzfr7CD74jtebqIY,35742
4
4
  omnata_plugin_runtime/forms.py,sha256=pw_aKVsXSz47EP8PFBI3VDwdSN5IjvZxp8JTjO1V130,18421
5
5
  omnata_plugin_runtime/logging.py,sha256=bn7eKoNWvtuyTk7RTwBS9UARMtqkiICtgMtzq3KA2V0,3272
6
- omnata_plugin_runtime/omnata_plugin.py,sha256=r0LtznaHkoPmWVUZGBdeaVtNZlm-eWQrUhDuvE4p_gQ,104272
6
+ omnata_plugin_runtime/omnata_plugin.py,sha256=OqGbc5bmEppXXcwBKQzG3T91RnnzQAjFWn7fAnTWVHE,104289
7
7
  omnata_plugin_runtime/plugin_entrypoints.py,sha256=D2f0Qih7KTJNXIDYkA-E55RTEK_7Jtv9ySqspWxERVA,28272
8
8
  omnata_plugin_runtime/rate_limiting.py,sha256=se6MftQI5NrVHaLb1hByPCgAESPQhkAgIG7KIU1clDU,16562
9
- omnata_plugin_runtime-0.3.26.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
10
- omnata_plugin_runtime-0.3.26.dist-info/METADATA,sha256=BhwdGf6WJu4AfRYcyWYst7fjt1mUXb8M0w9tCtKiehg,1601
11
- omnata_plugin_runtime-0.3.26.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
- omnata_plugin_runtime-0.3.26.dist-info/RECORD,,
9
+ omnata_plugin_runtime-0.3.27.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
10
+ omnata_plugin_runtime-0.3.27.dist-info/METADATA,sha256=MLE3ERcCMnakSZPjzWx0ulVW0u0Jusy2SmsFD4CWncw,1601
11
+ omnata_plugin_runtime-0.3.27.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
+ omnata_plugin_runtime-0.3.27.dist-info/RECORD,,