计轴rssp 集成

This commit is contained in:
xzb 2023-11-09 13:43:18 +08:00
parent e4ce33867e
commit d4a2cf2f80
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package axle_device
import (
"context"
"fmt"
"joylink.club/bj-rtsts-server/config"
"joylink.club/bj-rtsts-server/third_party/message"
"log/slog"
@ -105,7 +106,7 @@ func (s *rsspAxle) Stop() {
func (s *rsspAxle) doTaskSendStatus(sendContext context.Context) {
defer func() {
if e := recover(); e != nil {
slog.Error("定时发送计轴区段状态任务异常", "error", e, "stack", string(debug.Stack()))
slog.Error(fmt.Sprintf("[%s-%s-%s]定时发送计轴区段状态任务异常", s.city, s.lineId, s.centralizedStation), "error", e, "stack", string(debug.Stack()))
debug.PrintStack()
}
}()
@ -116,7 +117,7 @@ func (s *rsspAxle) doTaskSendStatus(sendContext context.Context) {
default:
}
if s.messageManager == nil {
slog.Warn("定时发送计轴区段状态任务因messageManager不存在退出")
slog.Warn(fmt.Sprintf("[%s-%s-%s]定时发送计轴区段状态任务因messageManager不存在退出", s.city, s.lineId, s.centralizedStation))
return
}
//收集区段状态