zhangkun9038@dingtalk.com 2025-01-23 12:00:23 +08:00
parent 97db2d80c8
commit 1a7819e703
2 changed files with 6 additions and 2 deletions

View File

@ -534,7 +534,9 @@ func (cl *Candle) SetToKey(core *Core) ([]interface{}, error) {
logrus.Error("err of PeriodToMinutes:", err) logrus.Error("err of PeriodToMinutes:", err)
} }
// expf := float64(exp) * 60 // expf := float64(exp) * 60
expf := float64(exp) * 300 length, _ := core.Cfg.Config.Get("sortedSet").Get("length").String()
ln := ToFloat64(length)
expf := float64(exp) * ln
extt := time.Duration(expf) * time.Minute extt := time.Duration(expf) * time.Minute
curVolstr, _ := data[5].(string) curVolstr, _ := data[5].(string)
curVol, err := strconv.ParseFloat(curVolstr, 64) curVol, err := strconv.ParseFloat(curVolstr, 64)

View File

@ -699,7 +699,9 @@ func (cr *Core) GetExpiration(per string) (time.Duration, error) {
return 0, err return 0, err
} }
exp, err := cr.PeriodToMinutes(per) exp, err := cr.PeriodToMinutes(per)
dur := time.Duration(exp*300) * time.Minute length, _ := cr.Cfg.Config.Get("sortedSet").Get("length").String()
ln := ToInt64(length)
dur := time.Duration(exp*ln) * time.Minute
return dur, err return dur, err
} }