diff --git a/CHANGELOG.md b/CHANGELOG.md index fbf18b70de..97a8ae2297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm +## 0.10.3 (2024-08-28) + +### Bug Fixes + +- Bugfix Semaphores get fail when moving to the next scheduled resync when syncing a large number of entities, using a single event loop for all threads + + ## 0.10.2 (2024-08-26) ### Bug Fixes diff --git a/port_ocean/ocean.py b/port_ocean/ocean.py index 3c6827552a..16b8b7ccda 100644 --- a/port_ocean/ocean.py +++ b/port_ocean/ocean.py @@ -89,6 +89,7 @@ async def execute_resync_all() -> None: raise e interval = self.config.scheduled_resync_interval + loop = asyncio.get_event_loop() if interval is not None: logger.info( f"Setting up scheduled resync, the integration will automatically perform a full resync every {interval} minutes)" @@ -99,7 +100,9 @@ async def execute_resync_all() -> None: wait_first=True, )( lambda: threading.Thread( - target=lambda: asyncio.run(execute_resync_all()) + target=lambda: asyncio.run_coroutine_threadsafe( + execute_resync_all(), loop + ) ).start() ) await repeated_function() diff --git a/pyproject.toml b/pyproject.toml index a06020a3c7..8de129f669 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "port-ocean" -version = "0.10.2" +version = "0.10.3" description = "Port Ocean is a CLI tool for managing your Port projects." readme = "README.md" homepage = "https://app.getport.io"