merge: fix recheck 0-result crash
All checks were successful
CI / test (push) Successful in 51s
CI / tag (push) Successful in 3s

This commit is contained in:
Deeman
2026-03-01 21:25:09 +01:00

View File

@@ -522,6 +522,10 @@ def extract_recheck(
dest_dir = landing_path(landing_dir, "playtomic", year, month)
dest = dest_dir / f"availability_{target_date}_recheck_{recheck_hour:02d}.jsonl.gz"
if not venues_data:
logger.warning("Recheck fetched 0 venues (%d errors) — skipping file write", venues_errored)
return {"files_written": 0, "files_skipped": 0, "bytes_written": 0}
captured_at = datetime.now(UTC).strftime("%Y-%m-%dT%H:%M:%SZ")
working_path = dest.with_suffix("").with_suffix(".working.jsonl")
with open(working_path, "w") as f: