diff --git a/backend/scheduler.py b/backend/scheduler.py index d420f6d..f710340 100644 --- a/backend/scheduler.py +++ b/backend/scheduler.py @@ -70,10 +70,10 @@ async def run_scheduled_booking_scrape_async(): async def run_scheduled_fetch_current_rates(): if is_sync_enabled("newbook_current_rates"): + # run_fetch_current_rates is a coroutine — await it directly; + # run_in_executor would return the coroutine object unawaited from jobs.fetch_current_rates import run_fetch_current_rates - import asyncio - loop = asyncio.get_event_loop() - await loop.run_in_executor(None, run_fetch_current_rates) + await run_fetch_current_rates() else: logger.debug("Newbook current rates sync skipped (disabled)")