From c924d793e8991740b0d33a199dafd398c3e1f787 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Sun, 5 Jul 2026 14:09:40 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20scheduled=20Newbook=20sync=20=E2=80=94=20?= =?UTF-8?q?await=20the=20coroutine=20instead=20of=20run=5Fin=5Fexecutor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run_fetch_current_rates is async; run_in_executor called it in a thread and discarded the coroutine, so the daily scheduled sync silently did nothing. Co-Authored-By: Claude Fable 5 --- backend/scheduler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)")