fix demo session 1

This commit is contained in:
Urtzi Alfaro
2026-01-02 11:12:50 +01:00
parent 507031deaf
commit cf0176673c
15 changed files with 136 additions and 107 deletions

View File

@@ -91,9 +91,12 @@ For more details, see services/forecasting/README.md
from typing import Dict, Any, Optional, List
from datetime import date
import structlog
from .base_service_client import BaseServiceClient
from shared.config.base import BaseServiceSettings
logger = structlog.get_logger()
class ForecastServiceClient(BaseServiceClient):
"""Client for communicating with the forecasting service"""
@@ -367,13 +370,13 @@ class ForecastServiceClient(BaseServiceClient):
)
if result:
self.logger.info(
logger.info(
"Demand insights triggered successfully via internal endpoint",
tenant_id=tenant_id,
insights_posted=result.get("insights_posted", 0)
)
else:
self.logger.warning(
logger.warning(
"Demand insights internal endpoint returned no result",
tenant_id=tenant_id
)
@@ -381,8 +384,8 @@ class ForecastServiceClient(BaseServiceClient):
return result
except Exception as e:
self.logger.error(
"Error triggering demand insights via internal endpoint",
logger.error(
"Failed to trigger demand insights",
tenant_id=tenant_id,
error=str(e)
)