Compare commits
No commits in common. "90afe9b6d33375fc1972f1f2a8fff217f247a965" and "c58cffe56e578ce60e2d67ab98af668e8ae7d5ca" have entirely different histories.
90afe9b6d3
...
c58cffe56e
@ -10,4 +10,4 @@ git submodule update --force --recursive --init --remote
|
|||||||
go mod tidy
|
go mod tidy
|
||||||
go mod vendor
|
go mod vendor
|
||||||
|
|
||||||
加入内网gitea库
|
|
||||||
|
@ -190,17 +190,15 @@ func (core *Core) SaveCandle(instId string, period string, rsp *CandleData, dura
|
|||||||
cs := CandleSegment{}
|
cs := CandleSegment{}
|
||||||
sv, _ := json.Marshal(v)
|
sv, _ := json.Marshal(v)
|
||||||
json.Unmarshal(sv, &cs)
|
json.Unmarshal(sv, &cs)
|
||||||
|
logrus.Warn("fetch segments2:", cs)
|
||||||
if !cs.Enabled {
|
if !cs.Enabled {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
logrus.Warn("fetch segments2: cs.Seg: ", cs.Seg, ", period:", period, ", cs.Seg == period: ", (cs.Seg == period))
|
|
||||||
|
|
||||||
if cs.Seg == period {
|
if cs.Seg == period {
|
||||||
curSegStartTime = cs.StartTime
|
curSegStartTime = cs.StartTime
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
logrus.Warn("curSegStartTime:", curSegStartTime)
|
|
||||||
curTm, _ := time.ParseInLocation("2006-01-02 15:04.000", curSegStartTime, time.Local)
|
curTm, _ := time.ParseInLocation("2006-01-02 15:04.000", curSegStartTime, time.Local)
|
||||||
curTmi := curTm.UnixMilli()
|
curTmi := curTm.UnixMilli()
|
||||||
|
|
||||||
@ -217,8 +215,7 @@ func (core *Core) SaveCandle(instId string, period string, rsp *CandleData, dura
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
minutes, _ := core.PeriodToMinutes(period)
|
minutes, _ := core.PeriodToMinutes(period)
|
||||||
logrus.Warn("tmi: ", tmi, " curTim:", curTmi, " minutes: ", minutes)
|
if (tmi-curTmi)/(minutes*1000000) != 0 {
|
||||||
if (tmi-curTmi)%(minutes*60000) != 0 {
|
|
||||||
logrus.Warn("saveCandles error: 当前记录中的时间戳:", curSegStartTime, ",并非周期节点:", period, " 忽略")
|
logrus.Warn("saveCandles error: 当前记录中的时间戳:", curSegStartTime, ",并非周期节点:", period, " 忽略")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user