port-ocean 0.24.19__py3-none-any.whl → 0.24.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.
@@ -617,22 +617,23 @@ class SyncRawMixin(HandlerMixin, EventsMixin):
617
617
  logger.info(f"Process finished for {resource.kind} with index {index}")
618
618
 
619
619
  async def process_resource(self, resource: ResourceConfig, index: int, user_agent_type: UserAgentType) -> tuple[list[Entity], list[Exception]]:
620
- if ocean.app.process_execution_mode == ProcessExecutionMode.multi_process:
621
- id = uuid.uuid4()
622
- logger.info(f"Starting subprocess with id {id}")
623
- file_ipc_map = {
624
- "process_resource": FileIPC(id, "process_resource",([],[IntegrationSubProcessFailedException(f"Subprocess failed for {resource.kind} with index {index}")])),
625
- "topological_entities": FileIPC(id, "topological_entities",[]),
626
- }
627
- process = ProcessWrapper(target=self.process_resource_in_subprocess, args=(file_ipc_map,resource,index,user_agent_type))
628
- process.start()
629
- await process.join_async()
630
-
631
- event.entity_topological_sorter.entities.extend(file_ipc_map["topological_entities"].load())
632
- return file_ipc_map["process_resource"].load()
620
+ with logger.contextualize(resource_kind=resource.kind, index=index):
621
+ if ocean.app.process_execution_mode == ProcessExecutionMode.multi_process:
622
+ id = uuid.uuid4()
623
+ logger.info(f"Starting subprocess with id {id}")
624
+ file_ipc_map = {
625
+ "process_resource": FileIPC(id, "process_resource",([],[IntegrationSubProcessFailedException(f"Subprocess failed for {resource.kind} with index {index}")])),
626
+ "topological_entities": FileIPC(id, "topological_entities",[]),
627
+ }
628
+ process = ProcessWrapper(target=self.process_resource_in_subprocess, args=(file_ipc_map,resource,index,user_agent_type))
629
+ process.start()
630
+ await process.join_async()
631
+
632
+ event.entity_topological_sorter.entities.extend(file_ipc_map["topological_entities"].load())
633
+ return file_ipc_map["process_resource"].load()
633
634
 
634
- else:
635
- return await self._process_resource(resource,index,user_agent_type)
635
+ else:
636
+ return await self._process_resource(resource,index,user_agent_type)
636
637
 
637
638
  async def _process_resource(self,resource: ResourceConfig, index: int, user_agent_type: UserAgentType)-> tuple[list[Entity], list[Exception]]:
638
639
  # create resource context per resource kind, so resync method could have access to the resource
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.24.19
3
+ Version: 0.24.20
4
4
  Summary: Port Ocean is a CLI tool for managing your Port projects.
5
5
  Home-page: https://app.getport.io
6
6
  Keywords: ocean,port-ocean,port
@@ -121,7 +121,7 @@ port_ocean/core/integrations/mixins/events.py,sha256=2L7P3Jhp8XBqddh2_o9Cn4N261n
121
121
  port_ocean/core/integrations/mixins/handler.py,sha256=mZ7-0UlG3LcrwJttFbMe-R4xcOU2H_g33tZar7PwTv8,3771
122
122
  port_ocean/core/integrations/mixins/live_events.py,sha256=zM24dhNc7uHx9XYZ6toVhDADPA90EnpOmZxgDegFZbA,4196
123
123
  port_ocean/core/integrations/mixins/sync.py,sha256=Vm_898pLKBwfVewtwouDWsXoxcOLicnAy6pzyqqk6U8,4053
124
- port_ocean/core/integrations/mixins/sync_raw.py,sha256=NTclUHBYH_RK895zM3VGfd3MyPRYvfqnWudXYN5RFqQ,33885
124
+ port_ocean/core/integrations/mixins/sync_raw.py,sha256=mbFRZzG91McaoeLP7rR9TP3Bb1N5zayHwF3t71u-Ncc,34022
125
125
  port_ocean/core/integrations/mixins/utils.py,sha256=N76dNu1Y6UEg0_pcSdF4RO6dQIZ8EBfX3xMelgWdMxM,3779
126
126
  port_ocean/core/models.py,sha256=DNbKpStMINI2lIekKprTqBevqkw_wFuFayN19w1aDfQ,2893
127
127
  port_ocean/core/ocean_types.py,sha256=4VipWFOHEh_d9LmWewQccwx1p2dtrRYW0YURVgNsAjo,1398
@@ -200,8 +200,8 @@ port_ocean/utils/repeat.py,sha256=U2OeCkHPWXmRTVoPV-VcJRlQhcYqPWI5NfmPlb1JIbc,32
200
200
  port_ocean/utils/signal.py,sha256=mMVq-1Ab5YpNiqN4PkiyTGlV_G0wkUDMMjTZp5z3pb0,1514
201
201
  port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
202
202
  port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
203
- port_ocean-0.24.19.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
204
- port_ocean-0.24.19.dist-info/METADATA,sha256=HE9-dswSXnOaFu4p3hJkDWy6syqUIADmnYhVSN2F4Vg,6856
205
- port_ocean-0.24.19.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
206
- port_ocean-0.24.19.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
207
- port_ocean-0.24.19.dist-info/RECORD,,
203
+ port_ocean-0.24.20.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
204
+ port_ocean-0.24.20.dist-info/METADATA,sha256=fPKhhQUTw4aSDDmonmitNlAly2DARNFFdr6voWyS3kE,6856
205
+ port_ocean-0.24.20.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
206
+ port_ocean-0.24.20.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
207
+ port_ocean-0.24.20.dist-info/RECORD,,