Add coverage for CLI::Feeds command (#25319)
This commit is contained in:
1 parent
07933db788
commit
b5675e265e
2 files changed
+63
-1
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user