more stuff
This commit is contained in:
@@ -67,6 +67,7 @@ type CartGrain struct {
|
||||
Items []*CartItem `json:"items"`
|
||||
TotalPrice int64 `json:"totalPrice"`
|
||||
Deliveries []*CartDelivery `json:"deliveries,omitempty"`
|
||||
Processing bool `json:"processing"`
|
||||
}
|
||||
|
||||
type Grain interface {
|
||||
@@ -339,6 +340,13 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa
|
||||
Price: 49,
|
||||
Items: items,
|
||||
})
|
||||
c.Processing = true
|
||||
go func() {
|
||||
time.Sleep(5 * time.Second)
|
||||
c.mu.Lock()
|
||||
c.Processing = false
|
||||
c.mu.Unlock()
|
||||
}()
|
||||
}
|
||||
case RemoveDeliveryType:
|
||||
msg, ok := message.Content.(*messages.RemoveDelivery)
|
||||
|
||||
Reference in New Issue
Block a user