Merge branch 'standalone_develop' into pre_trustie_server
This commit is contained in:
commit
90d0c8a282
|
@ -10,7 +10,7 @@ class Admins::ProjectsRankController < Admins::BaseController
|
|||
sum(issues) as issues,
|
||||
sum(pullrequests) as pullrequests,
|
||||
sum(commits) as commits").includes(:project)
|
||||
@statistics = @statistics.order("#{sort_by} #{sort_direction}")
|
||||
@statistics = paginate @statistics.order("#{sort_by} #{sort_direction}")
|
||||
export_excel(@statistics.limit(50))
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ class VersionReleasesController < ApplicationController
|
|||
include ApplicationHelper
|
||||
before_action :load_repository
|
||||
before_action :set_user
|
||||
before_action :require_login, except: [:index, :show]
|
||||
before_action :require_login, except: [:index, :show, :download]
|
||||
before_action :check_release_authorize, except: [:index, :show, :download]
|
||||
before_action :find_version , only: [:show, :edit, :update, :destroy]
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ class CacheAsyncClearJob < ApplicationJob
|
|||
queue_as :cache
|
||||
|
||||
def perform(type, id=nil)
|
||||
return if id.nil?
|
||||
case type
|
||||
when "project_common_service"
|
||||
Cache::V2::ProjectCommonService.new(id).clear
|
||||
|
|
|
@ -181,14 +181,14 @@ class Project < ApplicationRecord
|
|||
end
|
||||
if changes[:is_public].present?
|
||||
if changes[:is_public][0] && !changes[:is_public][1]
|
||||
CacheAsyncClearJob.perform_later('project_rank_service', self.id)
|
||||
CacheAsyncClearJob.set(wait: 5.seconds).perform_later('project_rank_service', self.id)
|
||||
end
|
||||
if !changes[:is_public][0] && changes[:is_public][1]
|
||||
$redis_cache.srem("v2-project-rank-deleted", self.id)
|
||||
end
|
||||
end
|
||||
if !self.common?
|
||||
CacheAsyncClearJob.perform_later('project_rank_service', self.id)
|
||||
CacheAsyncClearJob.set(wait: 5.seconds).perform_later('project_rank_service', self.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -35,3 +35,5 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= render partial: 'admins/shared/paginate', locals: { objects: statistics } %>
|
Loading…
Reference in New Issue