feat:中间件日志聚集

This commit is contained in:
songzhibin97
2021-10-13 13:04:56 +08:00
parent cc8facbda3
commit 9b7db8ad09
2 changed files with 88 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ func SetLimitWithTime(key string, limit int, expiration time.Duration) error {
pipe := global.GVA_REDIS.TxPipeline()
pipe.Incr(context.Background(), key)
pipe.Expire(context.Background(), key, expiration)
_, err := pipe.Exec(context.Background())
_, err = pipe.Exec(context.Background())
return err
} else {
//次数