Ops
Weather-gate configuration
Live read of the three constants that decide what appears on the homepage.
This page is read-only. Changes require direct DB access
and are audited in settings_audit_log.
Active thresholds
| Setting key | Value | Allowed range | Meaning |
|---|---|---|---|
weather.min_temp_f |
70.0°F | 32.0–110.0 | Daily high must be strictly above this to pass |
weather.max_rain_pct |
20.0% | 0.0–100.0 | Precip probability must be strictly below this to pass |
weather.window_size |
3 days | 1–14 | Consecutive qualifying days required for a destination to appear |
Preview API
Before changing any threshold, call the preview endpoint to see the qualifying count:
GET /api/gate-config/preview?min_temp_f=72&max_rain_pct=15&window_size=2
How to change a threshold
- Call
/api/gate-config/previewwith the proposed values and confirm the qualifying count looks right. - Open a DB session (e.g.
psql $DATABASE_URL). - Run:
UPDATE settings SET value = '72', updated_at = now() WHERE key = 'weather.min_temp_f'; INSERT INTO settings_audit_log (settings_key, old_value, new_value, changed_by) VALUES ('weather.min_temp_f', '70', '72', 'your-name'); - Reload the app process (
systemctl restart sunnydays-travel) so the process cache is cleared. - Verify on /api/gate-config that the new value is live.