fix demo session 1
This commit is contained in:
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user