Fix empty home feed before first follow has finished processing (#16152)
Change queue of merge worker from pull to default
This commit is contained in:
parent
8c44b723bb
commit
fab65848d2
4 changed files with 20 additions and 5 deletions
|
@ -184,6 +184,14 @@ module AccountInteractions
|
|||
active_relationships.where(target_account: other_account).exists?
|
||||
end
|
||||
|
||||
def following_anyone?
|
||||
active_relationships.exists?
|
||||
end
|
||||
|
||||
def not_following_anyone?
|
||||
!following_anyone?
|
||||
end
|
||||
|
||||
def blocking?(other_account)
|
||||
block_relationships.where(target_account: other_account).exists?
|
||||
end
|
||||
|
|
|
@ -458,9 +458,7 @@ class User < ApplicationRecord
|
|||
end
|
||||
|
||||
def regenerate_feed!
|
||||
return unless Redis.current.setnx("account:#{account_id}:regeneration", true)
|
||||
Redis.current.expire("account:#{account_id}:regeneration", 1.day.seconds)
|
||||
RegenerationWorker.perform_async(account_id)
|
||||
RegenerationWorker.perform_async(account_id) if Redis.current.set("account:#{account_id}:regeneration", true, nx: true, ex: 1.day.seconds)
|
||||
end
|
||||
|
||||
def needs_feed_update?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue