mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-24 05:25:08 +01:00
Fix tootctl not allocating enough database connections for main thread (#12097)
This commit is contained in:
parent
0336621c80
commit
6c9b4f6b77
@ -20,7 +20,7 @@ module Mastodon
|
|||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
ActiveRecord::Base.configurations[Rails.env]['pool'] = options[:concurrency]
|
ActiveRecord::Base.configurations[Rails.env]['pool'] = options[:concurrency] + 1
|
||||||
|
|
||||||
progress = create_progress_bar(scope.count)
|
progress = create_progress_bar(scope.count)
|
||||||
pool = Concurrent::FixedThreadPool.new(options[:concurrency])
|
pool = Concurrent::FixedThreadPool.new(options[:concurrency])
|
||||||
|
@ -27,7 +27,6 @@ module Mastodon
|
|||||||
dry_run = options[:dry_run] ? '(DRY RUN)' : ''
|
dry_run = options[:dry_run] ? '(DRY RUN)' : ''
|
||||||
|
|
||||||
if options[:all] || username.nil?
|
if options[:all] || username.nil?
|
||||||
|
|
||||||
processed, = parallelize_with_progress(Account.joins(:user).merge(User.active)) do |account|
|
processed, = parallelize_with_progress(Account.joins(:user).merge(User.active)) do |account|
|
||||||
PrecomputeFeedService.new.call(account) unless options[:dry_run]
|
PrecomputeFeedService.new.call(account) unless options[:dry_run]
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user