Commit eb9591d1 by 朱继来

调整任务记录监听

parent 71524645
Showing with 3 additions and 13 deletions
......@@ -45,19 +45,9 @@ func main() {
logger.InitLogger("file", logConfig)
logger.Init()
// 定时执行
ticker := time.NewTicker(time.Minute * 1)
//ticker := time.NewTicker(time.Second * 5)
for {
select {
case <-ticker.C:
fmt.Println("ticker...")
go updateOverTime()
default:
time.Sleep(time.Microsecond * 100)
}
}
updateOverTime()
fmt.Println("任务执行完成")
}
func updateOverTime() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment