尝试在报错时补齐缺少的candle序列
This commit is contained in:
parent
4c689e9adf
commit
86d63a3318
@ -218,6 +218,7 @@ func InvokeCandle(cr *core.Core, candleName string, period string, from int64, t
|
|||||||
restQ := core.RestQueue{
|
restQ := core.RestQueue{
|
||||||
InstId: candleName,
|
InstId: candleName,
|
||||||
Bar: period,
|
Bar: period,
|
||||||
|
WithWs: false,
|
||||||
Limit: strconv.Itoa(candleCount), // 动态计算limit
|
Limit: strconv.Itoa(candleCount), // 动态计算limit
|
||||||
After: from,
|
After: from,
|
||||||
}
|
}
|
||||||
@ -290,7 +291,6 @@ func GetRangeCandleSortedSet(cr *core.Core, setName string, count int, from time
|
|||||||
go func() {
|
go func() {
|
||||||
parts := strings.Split(setName, "|")
|
parts := strings.Split(setName, "|")
|
||||||
instId := parts[1]
|
instId := parts[1]
|
||||||
// 定义正则表达式,匹配 maX 或 candle 后面的内容直到第一个竖线
|
|
||||||
period, _ := extractString(setName)
|
period, _ := extractString(setName)
|
||||||
InvokeCandle(cr, instId, period, fromt, sti)
|
InvokeCandle(cr, instId, period, fromt, sti)
|
||||||
}()
|
}()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user