mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-14 00:07:01 +08:00
fix: prevent panic on empty trader ID
This commit is contained in:
4
main.go
4
main.go
@@ -121,8 +121,10 @@ func main() {
|
|||||||
if t.IsRunning {
|
if t.IsRunning {
|
||||||
status = "✅ Running"
|
status = "✅ Running"
|
||||||
}
|
}
|
||||||
|
tid := t.ID
|
||||||
|
if len(tid) > 8 { tid = tid[:8] }
|
||||||
logger.Infof(" • %s [%s] %s - AI Model: %s, Exchange: %s",
|
logger.Infof(" • %s [%s] %s - AI Model: %s, Exchange: %s",
|
||||||
t.Name, t.ID[:8], status, t.AIModelID, t.ExchangeID)
|
t.Name, tid, status, t.AIModelID, t.ExchangeID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user