根据配置决定要不要saveCandle

This commit is contained in:
zhangkun 2024-12-11 23:03:40 +08:00
parent c548e79e87
commit 0932c04a66
2 changed files with 2 additions and 1 deletions

View File

@ -164,15 +164,16 @@ func (core *Core) SaveCandle(instId string, period string, rsp *CandleData, dura
Data: v,
From: "rest",
}
//存到elasticSearch
candle.PushToWriteLogChan(core)
//保存rest得到的candle
saveCandle := os.Getenv("TEXUS_SAVECANDLE")
// 发布到allCandles|publish, 给外部订阅者用于setToKey
arys := []string{ALLCANDLES_PUBLISH}
if withWs {
arys = append(arys, ALLCANDLES_INNER_PUBLISH)
}
// 如果candle都不需要存到redis那么AddToGeneralCandleChnl也没有意义
saveCandle := os.Getenv("TEXUS_SAVECANDLE")
if saveCandle == "true" {
candle.SetToKey(core)
core.AddToGeneralCandleChnl(&candle, arys)

BIN
texus

Binary file not shown.