update
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 27s
Build and Publish / BuildAndDeploy (push) Successful in 2m26s

This commit is contained in:
matst80
2024-11-14 21:02:36 +01:00
parent c8cd8bc745
commit 0870a37d90

View File

@@ -336,19 +336,20 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa
} }
} }
} }
c.Deliveries = append(c.Deliveries, &CartDelivery{ if len(items) > 0 {
Id: c.lastDeliveryId,
Provider: msg.Provider, c.Deliveries = append(c.Deliveries, &CartDelivery{
Price: 49, Id: c.lastDeliveryId,
Items: items, Provider: msg.Provider,
}) Price: 49,
c.Processing = true Items: items,
go func() { })
time.Sleep(5 * time.Second) c.Processing = true
c.mu.Lock() go func() {
c.Processing = false time.Sleep(5 * time.Second)
c.mu.Unlock() c.Processing = false
}() }()
}
} }
case RemoveDeliveryType: case RemoveDeliveryType:
msg, ok := message.Content.(*messages.RemoveDelivery) msg, ok := message.Content.(*messages.RemoveDelivery)