fix letni /zimni cas OTE
All checks were successful
deploy / deploy (push) Successful in 19s
test / smoke-test (push) Successful in 5s

This commit is contained in:
Dusan Vojacek
2026-04-12 21:57:37 +02:00
parent 5919b6caf3
commit f0dfcefd54
4 changed files with 62 additions and 40 deletions

View File

@@ -46,7 +46,7 @@ from services.notification_service import (
notify_operating_mode_changed,
run_fn_set_mode_with_discord,
)
from services.price_importer import import_ote_prices
from services.price_importer import import_ote_prices, ote_prague_day_slots_look_complete
from services.telemetry_collector import run_telemetry_loop_wrapper
from pydantic import BaseModel, Field
@@ -317,7 +317,7 @@ async def lifespan(app: FastAPI):
for day in (today, tomorrow):
slots = await _count_ote_slots_for_day(conn, day)
if slots >= 96:
if ote_prague_day_slots_look_complete(slots):
continue
n, imported_day, _, err = await import_ote_prices(
conn, site_id=None, target_date=day