Skip to content

Commit

Permalink
fix: no need for await for a regular function
Browse files Browse the repository at this point in the history
  • Loading branch information
Shalev Avhar committed Jul 28, 2024
1 parent 95eca6b commit 9d6a101
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions port_ocean/ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@ async def _setup_scheduled_resync(
) -> None:
async def execute_resync_all() -> None:
now = datetime.datetime.now()
calculation = asyncio.create_task(
calculate_next_resync(now, self.config.scheduled_resync_interval)
next_resync = calculate_next_resync(
now, self.config.scheduled_resync_interval
)
logger.info("Starting a new scheduled resync")
await self.integration.sync_raw_all()
next_resync = await calculation

if next_resync:
await self.port_client.update_resync_state(
Expand Down

0 comments on commit 9d6a101

Please sign in to comment.