计轴rssp 集成
This commit is contained in:
parent
e4ce33867e
commit
d4a2cf2f80
5
third_party/axle_device/rssp_axle.go
vendored
5
third_party/axle_device/rssp_axle.go
vendored
@ -2,6 +2,7 @@ package axle_device
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"joylink.club/bj-rtsts-server/config"
|
"joylink.club/bj-rtsts-server/config"
|
||||||
"joylink.club/bj-rtsts-server/third_party/message"
|
"joylink.club/bj-rtsts-server/third_party/message"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
@ -105,7 +106,7 @@ func (s *rsspAxle) Stop() {
|
|||||||
func (s *rsspAxle) doTaskSendStatus(sendContext context.Context) {
|
func (s *rsspAxle) doTaskSendStatus(sendContext context.Context) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if e := recover(); e != nil {
|
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()
|
debug.PrintStack()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
@ -116,7 +117,7 @@ func (s *rsspAxle) doTaskSendStatus(sendContext context.Context) {
|
|||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
if s.messageManager == nil {
|
if s.messageManager == nil {
|
||||||
slog.Warn("定时发送计轴区段状态任务因messageManager不存在退出")
|
slog.Warn(fmt.Sprintf("[%s-%s-%s]定时发送计轴区段状态任务因messageManager不存在退出", s.city, s.lineId, s.centralizedStation))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//收集区段状态
|
//收集区段状态
|
||||||
|
Loading…
Reference in New Issue
Block a user