feat: always sync full 24 months horizon of contingents

This commit is contained in:
Björn Fromme
2026-08-20 12:03:21 +02:00
parent 351fbab498
commit c1f0cda479
6 changed files with 41 additions and 42 deletions
+2 -2
View File
@@ -37,8 +37,8 @@ class ContingentSnapshotManager
* Refreshes [dateFrom, dateTo] for a single accommodation.
*
* Days are fetched, diffed against what is stored and then persisted; the snapshot outside
* the requested window is left untouched, which is what lets the near-term and full-horizon
* schedules run at different cadences without fighting each other.
* the requested window is left untouched, so a narrow ad-hoc run cannot truncate what a
* full-horizon run already stored.
*/
public function sync(
Accommodation $accommodation,
+3 -2
View File
@@ -24,8 +24,9 @@ class ContingentSnapshotReader
/**
* How old the snapshot may get before we stop presenting it as current availability.
*
* The near-term sync runs every 15 minutes during the day and hourly overnight, so this only
* trips when the scheduler is genuinely broken, never on the normal cadence.
* The sync runs every 15 minutes during the day and hourly overnight, so even the sparsest
* cadence leaves five missed runs of slack: this only trips when the scheduler is genuinely
* broken, never on the normal cadence.
*/
private const string MAX_SNAPSHOT_AGE = '-6 hours';