add reservations to the model
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 46s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m48s

This commit is contained in:
matst80
2025-11-26 19:25:20 +01:00
parent 95426acd4a
commit 400079ec98
8 changed files with 461 additions and 433 deletions

View File

@@ -23,6 +23,7 @@ import (
"go.opentelemetry.io/contrib/bridges/otelslog"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/timestamppb"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
@@ -304,7 +305,7 @@ func (s *PoolServer) HandleReservations(ctx context.Context, cartId cart.CartId,
}
logger.InfoContext(ctx, "reserved item", "sku", item.Sku, "location", string(locationId), "expires at", end.String())
span.End()
item.ReservationEndsTime = end
item.ReservationEndTime = timestamppb.New(end)
}
return nil
}