New token arch

This commit is contained in:
Urtzi Alfaro
2026-01-10 21:45:37 +01:00
parent cc53037552
commit bf1db7cb9e
26 changed files with 1751 additions and 107 deletions

View File

@@ -471,15 +471,20 @@ class OrdersService:
if self.notification_client and order.customer:
message = f"Order {order.order_number} status changed from {old_status} to {new_status}"
await self.notification_client.send_notification(
str(order.tenant_id),
{
"recipient": order.customer.email,
"message": message,
"type": "order_status_update",
"order_id": str(order.id)
tenant_id=str(order.tenant_id),
notification_type="email",
message=message,
recipient_email=order.customer.email,
subject=f"Order {order.order_number} Status Update",
priority="normal",
metadata={
"order_id": str(order.id),
"order_number": order.order_number,
"old_status": old_status,
"new_status": new_status
}
)
except Exception as e:
logger.warning("Failed to send status notification",
order_id=str(order.id),
logger.warning("Failed to send status notification",
order_id=str(order.id),
error=str(e))