Compare commits
No commits in common. "6b3ef527389a1fed6ba522fe0acdd2d46e2e3ca6" and "ce5597f4dd88e365c7cc7982d5a07a87ca78183f" have entirely different histories.
6b3ef52738
...
ce5597f4dd
|
|
@ -174,7 +174,6 @@ func (s *SendCardClient) processContentChannel(ctx context.Context, cardSend *Ca
|
|||
// 通道关闭,发送最终内容
|
||||
if contentBuilder.Len() > 0 {
|
||||
if err := s.updateCardContent(ctx, cardSend, cardInstanceId, contentBuilder.String(), client); err != nil {
|
||||
log.Info("contentBuilder.Len()修改失败1")
|
||||
s.logger.Errorf("更新卡片失败1:%s", err.Error())
|
||||
}
|
||||
}
|
||||
|
|
@ -183,7 +182,6 @@ func (s *SendCardClient) processContentChannel(ctx context.Context, cardSend *Ca
|
|||
contentBuilder.WriteString(content)
|
||||
if contentBuilder.Len() > 0 {
|
||||
if err := s.updateCardContent(ctx, cardSend, cardInstanceId, contentBuilder.String(), client); err != nil {
|
||||
log.Info("contentBuilder.Len()修改失败2")
|
||||
s.logger.Errorf("更新卡片失败2:%s", err.Error())
|
||||
}
|
||||
}
|
||||
|
|
@ -191,12 +189,10 @@ func (s *SendCardClient) processContentChannel(ctx context.Context, cardSend *Ca
|
|||
|
||||
case <-heartbeatTicker.C:
|
||||
if time.Now().Unix()-lastUpdate.Unix() >= HeardBeatX {
|
||||
log.Info("心跳超时")
|
||||
return
|
||||
}
|
||||
|
||||
case <-ctx.Done():
|
||||
log.Info("send_card上下文失效")
|
||||
s.logger.Info("context canceled, stop channel processing")
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue