- replace all goroutine and AfterFunc with recover version
This commit is contained in:
@@ -164,7 +164,7 @@ func (c *OrderManager) replyOrderComment(orderComment *model.OrderComment) (err
|
||||
delaySeconds := config.delayGapBegin + rand.Intn(config.delayGapEnd-config.delayGapBegin)
|
||||
content := config.comments[rand.Intn(len(config.comments))]
|
||||
globals.SugarLogger.Debugf("replyOrderComment orderID:%s, delaySeconds:%d, content:%s", orderComment.VendorOrderID, delaySeconds, content)
|
||||
time.AfterFunc(time.Duration(delaySeconds)*time.Second, func() {
|
||||
utils.AfterFuncWithRecover(time.Duration(delaySeconds)*time.Second, func() {
|
||||
if globals.ReallySendWeixinMsg {
|
||||
if handler := partner.GetPurchasePlatformFromVendorID(orderComment.VendorID); handler != nil {
|
||||
err = handler.ReplyOrderComment(jxcontext.AdminCtx, orderComment, content)
|
||||
|
||||
Reference in New Issue
Block a user