omnata-plugin-runtime 0.10.31__py3-none-any.whl → 0.10.32a296__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.
@@ -108,9 +108,9 @@ class OutboundSyncRequestPayload(BaseModel):
108
108
  Encapsulates the payload that is sent to the plugin when it is invoked to perform an outbound sync.
109
109
  """
110
110
 
111
- sync_id: int # only used by log handler
111
+ sync_id: int
112
112
  sync_branch_name: str = 'main'
113
- sync_branch_id: Optional[int] # only used by log handler
113
+ sync_branch_id: Optional[int]
114
114
  connection_id: int # only used by log handler
115
115
  run_id: int # used by log handler and for reporting back run status updates
116
116
  source_app_name: str # the name of the app which is invoking this plugin
@@ -139,8 +139,8 @@ class InboundSyncRequestPayload(BaseModel):
139
139
  Encapsulates the payload that is sent to the plugin when it is invoked to perform an inbound sync.
140
140
  """
141
141
 
142
- sync_id: int # only used by log handler
143
- sync_branch_name: str = 'main' # only used by rate limit updater
142
+ sync_id: int
143
+ sync_branch_name: str = 'main'
144
144
  sync_branch_id: Optional[int] = None # only used by log handler
145
145
  connection_id: int # only used by log handler
146
146
  run_id: int # used by log handler and for reporting back run status updates
@@ -289,6 +289,8 @@ class SyncRequest(ABC):
289
289
  run_deadline: datetime.datetime,
290
290
  development_mode: bool = False,
291
291
  test_replay_mode: bool = False,
292
+ sync_id: Optional[int] = None,
293
+ branch_name: Optional[str] = None
292
294
  ):
293
295
  """
294
296
  Constructs a SyncRequest.
@@ -314,6 +316,8 @@ class SyncRequest(ABC):
314
316
  self.plugin_instance._sync_request = self
315
317
  self._session: Session = session
316
318
  self._run_id = run_id
319
+ self._sync_id = sync_id
320
+ self._branch_name = branch_name
317
321
  self.api_limits = api_limits
318
322
  self.rate_limit_state_all = rate_limit_state_all
319
323
  self.rate_limit_state_this_sync_and_branch = rate_limit_state_this_sync_and_branch
@@ -692,6 +696,8 @@ class OutboundSyncRequest(SyncRequest):
692
696
  run_deadline: datetime.datetime,
693
697
  development_mode: bool = False,
694
698
  test_replay_mode: bool = False,
699
+ sync_id: Optional[int] = None,
700
+ branch_name: Optional[str] = None
695
701
  ):
696
702
  """
697
703
  Constructs an OutboundSyncRequest.
@@ -717,7 +723,9 @@ class OutboundSyncRequest(SyncRequest):
717
723
  rate_limit_state_this_sync_and_branch=rate_limit_state_this_sync_and_branch,
718
724
  run_deadline=run_deadline,
719
725
  development_mode=development_mode,
720
- test_replay_mode=test_replay_mode
726
+ test_replay_mode=test_replay_mode,
727
+ sync_id=sync_id,
728
+ branch_name=branch_name
721
729
  )
722
730
  self._full_records_table_name = (
723
731
  f"{source_app_name}.{records_schema_name}.{records_table_name}"
@@ -1018,6 +1026,8 @@ class InboundSyncRequest(SyncRequest):
1018
1026
  omnata_log_handler:OmnataPluginLogHandler,
1019
1027
  development_mode: bool = False,
1020
1028
  test_replay_mode: bool = False,
1029
+ sync_id: Optional[int] = None,
1030
+ branch_name: Optional[str] = None
1021
1031
  ):
1022
1032
  """
1023
1033
  Constructs a record apply request.
@@ -1071,7 +1081,9 @@ class InboundSyncRequest(SyncRequest):
1071
1081
  rate_limit_state_this_sync_and_branch=rate_limit_state_this_sync_and_branch,
1072
1082
  run_deadline=run_deadline,
1073
1083
  development_mode=development_mode,
1074
- test_replay_mode=test_replay_mode
1084
+ test_replay_mode=test_replay_mode,
1085
+ sync_id=sync_id,
1086
+ branch_name=branch_name
1075
1087
  )
1076
1088
  # named by convention, see SyncRunProcessor.enqueue
1077
1089
  self._criteria_deletes_table_name = (
@@ -184,7 +184,9 @@ class PluginEntrypoint:
184
184
  rate_limit_state_this_sync_and_branch=rate_limit_state_this_branch,
185
185
  run_deadline=datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(minutes=request.time_limit_mins),
186
186
  # for now, use the development mode flag to disable background workers
187
- development_mode=self._plugin_instance.disable_background_workers
187
+ development_mode=self._plugin_instance.disable_background_workers,
188
+ sync_id=request.sync_id,
189
+ sync_branch_name=request.sync_branch_name
188
190
  )
189
191
  try:
190
192
  self._plugin_instance._configuration_parameters = parameters
@@ -240,7 +242,9 @@ class PluginEntrypoint:
240
242
  # for now, use the development mode flag to disable background workers
241
243
  development_mode=self._plugin_instance.disable_background_workers,
242
244
  streams=list(request.streams_configuration.included_streams.values()),
243
- omnata_log_handler=omnata_log_handler
245
+ omnata_log_handler=omnata_log_handler,
246
+ sync_id=request.sync_id,
247
+ sync_branch_name=request.sync_branch_name
244
248
  )
245
249
  try:
246
250
  self._plugin_instance._configuration_parameters = parameters
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.10.31
3
+ Version: 0.10.32a296
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,13 @@
1
+ omnata_plugin_runtime/__init__.py,sha256=MS9d1whnfT_B3-ThqZ7l63QeC_8OEKTuaYV5wTwRpBA,1576
2
+ omnata_plugin_runtime/api.py,sha256=5gbjbnFy72Xjf0E3kbG23G0V2J3CorvD5kpBn_BkdlI,8084
3
+ omnata_plugin_runtime/configuration.py,sha256=SffokJfgvy6V3kUsoEjXcK3GdNgHo6U3mgBEs0qBv4I,46972
4
+ omnata_plugin_runtime/forms.py,sha256=Lrbr3otsFDrvHWJw7v-slsW4PvEHJ6BG1Yl8oaJfiDo,20529
5
+ omnata_plugin_runtime/json_schema.py,sha256=wT8M1iVlfl_KoGYxYAB4rdYuXH25S49xPQO8odqZ0No,49204
6
+ omnata_plugin_runtime/logging.py,sha256=WBuZt8lF9E5oFWM4KYQbE8dDJ_HctJ1pN3BHwU6rcd0,4461
7
+ omnata_plugin_runtime/omnata_plugin.py,sha256=k69YYxnA7gb_CbakIKpNDQLyv0bRwYJ6LVKMerK03PU,134979
8
+ omnata_plugin_runtime/plugin_entrypoints.py,sha256=E_VJykvxig6Vwz5dQXpk-QWMeYqwhZEwFstwzDR1xkQ,32441
9
+ omnata_plugin_runtime/rate_limiting.py,sha256=qpr5esU4Ks8hMzuMpSR3gLFdor2ZUXYWCjmsQH_K6lQ,25882
10
+ omnata_plugin_runtime-0.10.32a296.dist-info/LICENSE,sha256=rGaMQG3R3F5-JGDp_-rlMKpDIkg5n0SI4kctTk8eZSI,56
11
+ omnata_plugin_runtime-0.10.32a296.dist-info/METADATA,sha256=NZAqyWRvP-7FiIL9qEd29ZoQmvIGFqz-mfR_C4ynvmQ,2212
12
+ omnata_plugin_runtime-0.10.32a296.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
13
+ omnata_plugin_runtime-0.10.32a296.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- omnata_plugin_runtime/__init__.py,sha256=MS9d1whnfT_B3-ThqZ7l63QeC_8OEKTuaYV5wTwRpBA,1576
2
- omnata_plugin_runtime/api.py,sha256=baGraSMiD4Yvi3ZWrEv_TKh8Ktd1U8riBdOpe9j0Puw,8202
3
- omnata_plugin_runtime/configuration.py,sha256=SffokJfgvy6V3kUsoEjXcK3GdNgHo6U3mgBEs0qBv4I,46972
4
- omnata_plugin_runtime/forms.py,sha256=Lrbr3otsFDrvHWJw7v-slsW4PvEHJ6BG1Yl8oaJfiDo,20529
5
- omnata_plugin_runtime/json_schema.py,sha256=wT8M1iVlfl_KoGYxYAB4rdYuXH25S49xPQO8odqZ0No,49204
6
- omnata_plugin_runtime/logging.py,sha256=WBuZt8lF9E5oFWM4KYQbE8dDJ_HctJ1pN3BHwU6rcd0,4461
7
- omnata_plugin_runtime/omnata_plugin.py,sha256=RnUEO_iPFqJEaixLDFfrzCC-HmEAtEIT_lgfgNyjBUs,134532
8
- omnata_plugin_runtime/plugin_entrypoints.py,sha256=SlpI3VF3EdTGFCr9wDD0kV4v6B6bHfNDFdC3slU2y8Y,32241
9
- omnata_plugin_runtime/rate_limiting.py,sha256=qpr5esU4Ks8hMzuMpSR3gLFdor2ZUXYWCjmsQH_K6lQ,25882
10
- omnata_plugin_runtime-0.10.31.dist-info/LICENSE,sha256=rGaMQG3R3F5-JGDp_-rlMKpDIkg5n0SI4kctTk8eZSI,56
11
- omnata_plugin_runtime-0.10.31.dist-info/METADATA,sha256=Cmtn6EI1zsfDqo0sZpM7A-MFclnY7zgELK16SPyNy9U,2208
12
- omnata_plugin_runtime-0.10.31.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
13
- omnata_plugin_runtime-0.10.31.dist-info/RECORD,,