This commit is contained in:
zhangkun 2024-12-02 23:20:56 +08:00
parent 461dac8d88
commit 2b7e5e6a1a
4 changed files with 2 additions and 16 deletions

@ -244,9 +244,8 @@ func (core *Core) SaveUniKey(period string, keyName string, extt time.Duration,
Content: cd,
Tag: "sardine.log.candle." + cl.Period,
}
go func() {
core.WriteLogChan <- &wg
}()
err := wg.Process(core)
fmt.Println("writeLog err:", err)
core.SaveToSortSet(period, keyName, extt, tsi)
}

@ -72,15 +72,6 @@ func (rst *RestQueue) Save(cr *Core) {
cr.SaveCandle(rst.InstId, rst.Bar, rsp, rst.Duration, rst.WithWs)
}
func WriteLogProcess(cr *Core) {
for {
wg := <-cr.WriteLogChan
go func(wg *WriteLog) {
wg.Process(cr)
}(wg)
}
}
func (cr *Core) ShowSysTime() {
rsp, _ := cr.RestInvoke("/api/v5/public/time", rest.GET)
fmt.Println("serverSystem time:", rsp)

@ -231,10 +231,6 @@ func main() {
go func() {
LoopSaveCandle(&cr)
}()
go func() {
core.WriteLogProcess(&cr)
}()
// 永久阻塞
select {}
}

BIN
tunas

Binary file not shown.