Browse Source

修复:加入移除排行榜队列延迟五秒

pull/347/head
yystopf 2 years ago
parent
commit
bad7be4266
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/models/project.rb

+ 2
- 2
app/models/project.rb View File

@@ -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



Loading…
Cancel
Save