Improve the design of the frontend 2

This commit is contained in:
Urtzi Alfaro
2025-08-08 23:06:54 +02:00
parent 62ca49d4b8
commit 8af17f1433
12 changed files with 325 additions and 66 deletions

View File

@@ -12,7 +12,7 @@ from sqlalchemy.ext.asyncio import AsyncSession
from app.core.database import get_db
from app.services.traffic_service import TrafficService
from app.services.messaging import data_publisher
from app.services.messaging import data_publisher, publish_traffic_updated
from app.schemas.external import (
TrafficDataResponse,
HistoricalTrafficRequest
@@ -45,7 +45,7 @@ async def get_current_traffic(
# Publish event (with error handling)
try:
await data_publisher.publish_traffic_updated({
await publish_traffic_updated({
"type": "current_requested",
"latitude": latitude,
"longitude": longitude,
@@ -91,7 +91,7 @@ async def get_historical_traffic(
# Publish event (with error handling)
try:
await data_publisher.publish_traffic_updated({
await publish_traffic_updated({
"type": "historical_requested",
"latitude": request.latitude,
"longitude": request.longitude,

View File

@@ -59,7 +59,7 @@ MADRID_BOUNDS = {
}
# Constants
MAX_HISTORICAL_DAYS = 365
MAX_HISTORICAL_DAYS = 1095 # 3 years - allow longer training periods
MAX_CSV_PROCESSING_ROWS = 5000000
MEASUREMENT_POINTS_LIMIT = 20
UTM_ZONE = 30 # Madrid is in UTM Zone 30N