test a version
Some checks are pending
Build and Publish / BuildAndDeployArm64 (push) Has started running
Build and Publish / BuildAndDeployAmd64 (push) Successful in 40s

This commit is contained in:
matst80
2025-12-01 09:36:59 +01:00
parent 84268eede4
commit f0c487b5e1
2 changed files with 2 additions and 1 deletions

View File

@@ -106,7 +106,7 @@ func main() {
_, span := tracer.Start(ctx, "Totals and promotions") _, span := tracer.Start(ctx, "Totals and promotions")
defer span.End() defer span.End()
g.UpdateTotals() g.UpdateTotals()
g.Version++
// promotionCtx := promotions.NewContextFromCart(g, promotions.WithNow(time.Now()), promotions.WithCustomerSegment("vip")) // promotionCtx := promotions.NewContextFromCart(g, promotions.WithNow(time.Now()), promotions.WithCustomerSegment("vip"))
// _, actions := promotionService.EvaluateAll(promotionData.State.Promotions, promotionCtx) // _, actions := promotionService.EvaluateAll(promotionData.State.Promotions, promotionCtx)
// for _, action := range actions { // for _, action := range actions {

View File

@@ -108,6 +108,7 @@ type CartGrain struct {
lastAccess time.Time lastAccess time.Time
lastChange time.Time // unix seconds of last successful mutation (replay sets from event ts) lastChange time.Time // unix seconds of last successful mutation (replay sets from event ts)
userId string userId string
Version uint
InventoryReserved bool `json:"inventoryReserved"` InventoryReserved bool `json:"inventoryReserved"`
Id CartId `json:"id"` Id CartId `json:"id"`
Items []*CartItem `json:"items"` Items []*CartItem `json:"items"`