mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
add: rank not include deleted project
This commit is contained in:
12
app/jobs/cache_async_clear_job.rb
Normal file
12
app/jobs/cache_async_clear_job.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CacheAsyncClearJob < ApplicationJob
|
||||
queue_as :cache
|
||||
|
||||
def perform(type, id=nil)
|
||||
case type
|
||||
when "project_common_service"
|
||||
Cache::V2::ProjectCommonService.new(id).clear
|
||||
when "owner_common_service"
|
||||
Cache::V2::OwnnerCommonService.new(id).clear
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -7,6 +7,8 @@ class CacheAsyncResetJob < ApplicationJob
|
||||
Cache::V2::PlatformStatisticService.new.reset
|
||||
when "project_common_service"
|
||||
Cache::V2::ProjectCommonService.new(id).reset
|
||||
when "owner_common_service"
|
||||
Cache::V2::OwnnerCommonService.new(id).reset
|
||||
when "user_statistic_service"
|
||||
Cache::V2::UserStatisticService.new(id).reset
|
||||
end
|
||||
|
||||
@@ -7,6 +7,8 @@ class CacheAsyncSetJob < ApplicationJob
|
||||
Cache::V2::PlatformStatisticService.new(params).call
|
||||
when "project_common_service"
|
||||
Cache::V2::ProjectCommonService.new(id, params).call
|
||||
when "owner_common_service"
|
||||
Cache::V2::OwnnerCommonService.new(id, params).call
|
||||
when "user_statistic_service"
|
||||
Cache::V2::UserStatisticService.new(id, params).call
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user