Add coverage for CLI::Feeds
command (#25319)
This commit is contained in:
parent
07933db788
commit
b5675e265e
2 changed files with 63 additions and 1 deletions
|
@ -19,7 +19,7 @@ module Mastodon::CLI
|
|||
LONG_DESC
|
||||
def build(username = nil)
|
||||
if options[:all] || username.nil?
|
||||
processed, = parallelize_with_progress(Account.joins(:user).merge(User.active)) do |account|
|
||||
processed, = parallelize_with_progress(active_user_accounts) do |account|
|
||||
PrecomputeFeedService.new.call(account) unless dry_run?
|
||||
end
|
||||
|
||||
|
@ -47,5 +47,11 @@ module Mastodon::CLI
|
|||
redis.del(keys)
|
||||
say('OK', :green)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def active_user_accounts
|
||||
Account.joins(:user).merge(User.active)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue