Commit 170de993 authored by JiebinHu's avatar JiebinHu

Update inner.go

parent cc86dcee
......@@ -134,7 +134,7 @@ func SyncStar(c *gin.Context) (*mycontext.MyContext, error) {
"month": time.Hour * 24 * 7 * 30 * 2,
}
num := len(stars)
for _, star := range stars {
for i, star := range stars {
for _, period := range []string{"day", "week", "month"} {
var dateStr string
switch period {
......@@ -148,6 +148,7 @@ func SyncStar(c *gin.Context) (*mycontext.MyContext, error) {
key := groupPower_k.GetGroupPowerStarRankKey(star.Type, period, star.GroupPowerId, dateStr)
model.RedisCluster.ZIncrBy(model, key, float64(star.Score), fmt.Sprintf("%d", star.UserId))
model.RedisCluster.Expire(model, key, ttl[period])
model.Log.Infof("SyncStar i:%v,star:%v", i, star)
}
}
type res struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment