根据配置决定要不要saveCandle
This commit is contained in:
parent
c548e79e87
commit
0932c04a66
@ -164,15 +164,16 @@ func (core *Core) SaveCandle(instId string, period string, rsp *CandleData, dura
|
|||||||
Data: v,
|
Data: v,
|
||||||
From: "rest",
|
From: "rest",
|
||||||
}
|
}
|
||||||
|
//存到elasticSearch
|
||||||
candle.PushToWriteLogChan(core)
|
candle.PushToWriteLogChan(core)
|
||||||
//保存rest得到的candle
|
//保存rest得到的candle
|
||||||
saveCandle := os.Getenv("TEXUS_SAVECANDLE")
|
|
||||||
// 发布到allCandles|publish, 给外部订阅者用于setToKey
|
// 发布到allCandles|publish, 给外部订阅者用于setToKey
|
||||||
arys := []string{ALLCANDLES_PUBLISH}
|
arys := []string{ALLCANDLES_PUBLISH}
|
||||||
if withWs {
|
if withWs {
|
||||||
arys = append(arys, ALLCANDLES_INNER_PUBLISH)
|
arys = append(arys, ALLCANDLES_INNER_PUBLISH)
|
||||||
}
|
}
|
||||||
// 如果candle都不需要存到redis,那么AddToGeneralCandleChnl也没有意义
|
// 如果candle都不需要存到redis,那么AddToGeneralCandleChnl也没有意义
|
||||||
|
saveCandle := os.Getenv("TEXUS_SAVECANDLE")
|
||||||
if saveCandle == "true" {
|
if saveCandle == "true" {
|
||||||
candle.SetToKey(core)
|
candle.SetToKey(core)
|
||||||
core.AddToGeneralCandleChnl(&candle, arys)
|
core.AddToGeneralCandleChnl(&candle, arys)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user