执行一般命令时不运行init()中内容

This commit is contained in:
刘祥超
2023-03-10 15:14:14 +08:00
parent f64b36f17a
commit de9e1a4515
40 changed files with 148 additions and 15 deletions

View File

@@ -20,6 +20,10 @@ import (
var logChan = make(chan *pb.NodeLog, 64) // 队列数量不需要太长,因为日志通常仅仅为调试用
func init() {
if !teaconst.IsMain {
return
}
// 定期上传日志
var ticker = time.NewTicker(60 * time.Second)
if Tea.IsTesting() {