top用户项目排行调整

This commit is contained in:
xxq250 2023-04-15 22:19:26 +08:00
parent 2dea54481c
commit 6a1abd36cf
2 changed files with 6 additions and 2 deletions

View File

@ -30,3 +30,4 @@ json.praises project_common["praises"]
json.issues project_common["issues"]
json.pulls project_common["pullrequests"]
json.commits project_common["commits"]
json.issues project_common["issues"]

View File

@ -28,6 +28,7 @@ praises = 0
issues = 0
pulls = 0
commits = 0
issues = 0
ids.each do |pid|
project_common = $redis_cache.hgetall("v2-project-common:#{pid}")
visits = visits + project_common["visits"].to_i
@ -37,6 +38,7 @@ ids.each do |pid|
issues = issues + project_common["issues"].to_i
pulls = pulls + project_common["pullrequests"].to_i
commits = commits + project_common["commits"].to_i
issues = issues + project_common["issues"].to_i
end
json.visits visits
@ -46,3 +48,4 @@ json.praises praises
json.issues issues
json.pulls pulls
json.commits commits
json.issues issues