修复:加入移除排行榜队列延迟五秒
This commit is contained in:
parent
93ad4b046b
commit
bad7be4266
|
@ -181,14 +181,14 @@ class Project < ApplicationRecord
|
||||||
end
|
end
|
||||||
if changes[:is_public].present?
|
if changes[:is_public].present?
|
||||||
if changes[:is_public][0] && !changes[:is_public][1]
|
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
|
end
|
||||||
if !changes[:is_public][0] && changes[:is_public][1]
|
if !changes[:is_public][0] && changes[:is_public][1]
|
||||||
$redis_cache.srem("v2-project-rank-deleted", self.id)
|
$redis_cache.srem("v2-project-rank-deleted", self.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if !self.common?
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue