forked from Trustie/forgeplus
fix: rank count
This commit is contained in:
parent
01f99a2f12
commit
4f53994470
|
@ -2,7 +2,7 @@ class ProjectRankController < ApplicationController
|
|||
# 根据时间获取热门项目
|
||||
def index
|
||||
$redis_cache.zunionstore("recent-days-project-rank", get_timeable_key_names)
|
||||
@project_rank = $redis_cache.zrevrange("recent-days-project-rank", 0, 5, withscores: true)
|
||||
@project_rank = $redis_cache.zrevrange("recent-days-project-rank", 0, 4, withscores: true)
|
||||
rescue Exception => e
|
||||
@project_rack = []
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ class UserRankController < ApplicationController
|
|||
# 根据时间获取热门开发者
|
||||
def index
|
||||
$redis_cache.zunionstore("recent-days-user-rank", get_timeable_key_names)
|
||||
@user_rank = $redis_cache.zrevrange("recent-days-user-rank", 0, 5, withscores: true)
|
||||
@user_rank = $redis_cache.zrevrange("recent-days-user-rank", 0, 3, withscores: true)
|
||||
rescue Exception => e
|
||||
@user_rank = []
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue