omnata-plugin-runtime 0.1.96__py3-none-any.whl → 0.1.97__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.
@@ -150,55 +150,7 @@ class PluginEntrypoint:
150
150
  sync_parameters=request.sync_parameters,
151
151
  current_form_parameters={},
152
152
  )
153
-
154
- # build streams object from parameters
155
- streams_list: List[StoredStreamConfiguration] = []
156
- streams_list = streams_list + list(
157
- request.streams_configuration.included_streams.values()
158
- )
159
-
160
- # if new streams are included, we need to fetch the list first to find them
161
- if request.streams_configuration.include_new_streams:
162
- all_streams: List[StreamConfiguration] = self._plugin_instance.inbound_stream_list(parameters)
163
- for s in all_streams:
164
- if (
165
- s.stream_name
166
- not in request.streams_configuration.included_streams
167
- and s.stream_name
168
- not in request.streams_configuration.excluded_streams
169
- ):
170
- if (
171
- request.streams_configuration.new_stream_sync_strategy
172
- not in s.supported_sync_strategies
173
- ):
174
- raise ValueError(
175
- f"New object {s.stream_name} was found, but does not support the defined sync strategy {request.streams_configuration}"
176
- )
177
- new_stream = StoredStreamConfiguration(
178
- stream_name=s.stream_name,
179
- cursor_field=s.source_defined_cursor,
180
- primary_key_field=s.source_defined_primary_key,
181
- latest_state={},
182
- storage_behaviour=request.streams_configuration.new_stream_storage_behaviour,
183
- stream=s,
184
- sync_strategy=request.streams_configuration.new_stream_sync_strategy,
185
- )
186
- streams_list.append(new_stream)
187
-
188
- for stream in streams_list:
189
- if stream.stream_name in request.latest_stream_state:
190
- stream.latest_state = request.latest_stream_state[
191
- stream.stream_name
192
- ]
193
- logger.info(
194
- f"Updating stream state for {stream.stream_name}: {stream.latest_state}"
195
- )
196
- else:
197
- logger.info(
198
- f"Existing stream state for {stream.stream_name} not found"
199
- )
200
- logger.info(f"streams list: {streams_list}")
201
- logger.info(f"streams config: {request.streams_configuration}")
153
+
202
154
  inbound_sync_request = InboundSyncRequest(
203
155
  run_id=request.run_id,
204
156
  session=self._session,
@@ -210,7 +162,7 @@ class PluginEntrypoint:
210
162
  rate_limit_state=request.rate_limits_state,
211
163
  run_deadline=datetime.datetime.now() + datetime.timedelta(hours=4),
212
164
  development_mode=False,
213
- streams=streams_list,
165
+ streams=request.streams_configuration.included_streams,
214
166
  )
215
167
 
216
168
  inbound_sync_request.update_activity("Invoking plugin")
@@ -226,7 +178,6 @@ class PluginEntrypoint:
226
178
  inbound_sync_request._thread_cancellation_token.set() # pylint: disable=protected-access
227
179
  inbound_sync_request._apply_results_task.join() # pylint: disable=protected-access
228
180
  inbound_sync_request._cancel_checking_task.join() # pylint: disable=protected-access
229
- return_dict["streams"] = [s.dict() for s in streams_list]
230
181
  return_dict["errored_streams"] = list(
231
182
  omnata_log_handler.stream_has_errors.keys()
232
183
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.1.96
3
+ Version: 0.1.97
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
@@ -4,9 +4,9 @@ omnata_plugin_runtime/configuration.py,sha256=kYvHt_CYn_GZDwkjRVJMqGNbmcO0uEFgHz
4
4
  omnata_plugin_runtime/forms.py,sha256=a76q0mZep-Q1XYw0c0uXA0_qbYLwQGAwHZMpZ8125Is,15235
5
5
  omnata_plugin_runtime/logging.py,sha256=ne1sLh5cBkjdRS54B30PGc5frABgjy0sF1_2RMcJ_Tk,3012
6
6
  omnata_plugin_runtime/omnata_plugin.py,sha256=62ChwLXpvXN6Q9mIlCGnTuAtjEGUnkbGLdgiamLPd7s,75032
7
- omnata_plugin_runtime/plugin_entrypoints.py,sha256=45Zb9Z5WHv-_h_lWwWCubZ7FZWkgIDgKs5tKIt4PZ40,23434
7
+ omnata_plugin_runtime/plugin_entrypoints.py,sha256=ZARuAavN8s9oqVGyTnx5eYudaoCFuwwtcPm0UgTKUQw,20821
8
8
  omnata_plugin_runtime/rate_limiting.py,sha256=OnFnCdMenpMpAZYumpe6mypRnMmDl1Q02vzlgmQgiw0,10733
9
- omnata_plugin_runtime-0.1.96.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
10
- omnata_plugin_runtime-0.1.96.dist-info/METADATA,sha256=ZutwprcLXEfWK2DgEX3hmyWFYRFTtiKK0oWk6vFJmwg,1086
11
- omnata_plugin_runtime-0.1.96.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
12
- omnata_plugin_runtime-0.1.96.dist-info/RECORD,,
9
+ omnata_plugin_runtime-0.1.97.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
10
+ omnata_plugin_runtime-0.1.97.dist-info/METADATA,sha256=XaD-UnfuV03ktHekYHHQr7URn75BcSaw_sVONMHh0lM,1086
11
+ omnata_plugin_runtime-0.1.97.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
12
+ omnata_plugin_runtime-0.1.97.dist-info/RECORD,,