This commit is contained in:
parent
97db2d80c8
commit
1a7819e703
@ -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)
|
||||||
|
4
core.go
4
core.go
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user