Port occupancy sync + category ordering from the forecasting version
- Bookability showed no availability because newbook_occupancy_report_data was never populated: add reports_occupancy client method and sync_occupancy job, run before rates in both Sync Now and the daily schedule (single fast API call) - Category order: default display_order to the Newbook category id on sync (was 0 → alphabetical), preserve manual order on re-sync, extend PATCH to accept display_order, add up/down reorder arrows in Settings Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
c924d793e8
commit
f51e1dcb76
5 changed files with 199 additions and 9 deletions
|
|
@ -73,6 +73,11 @@ async def run_scheduled_fetch_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
|
||||
from jobs.sync_occupancy import run_sync_occupancy
|
||||
try:
|
||||
await run_sync_occupancy()
|
||||
except Exception as e:
|
||||
logger.warning(f"Occupancy sync failed (continuing with rates): {e}")
|
||||
await run_fetch_current_rates()
|
||||
else:
|
||||
logger.debug("Newbook current rates sync skipped (disabled)")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue