From 62a37d7342223ecfc28abe23ef347e109b9e44ae Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Thu, 23 Jan 2025 12:21:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=EF=BC=9Ahttp://gitea.zjmod.x?= =?UTF-8?q?yz/phyer/core/issues/2#issue-2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core.go b/core.go index a5c6917..747fe05 100644 --- a/core.go +++ b/core.go @@ -699,9 +699,9 @@ func (cr *Core) GetExpiration(per string) (time.Duration, error) { return 0, err } exp, err := cr.PeriodToMinutes(per) - length, _ := cr.Cfg.Config.Get("sortedSet").Get("length").String() - ln := ToInt64(length) - dur := time.Duration(exp*ln) * time.Minute + length, _ := cr.Cfg.Config.Get("sortedSet").Get("length").Int64() + logrus.Info("length of sortedSet: ", length) + dur := time.Duration(exp*length) * time.Minute return dur, err }