Fix tootctl not allocating enough database connections for main thread (#12097)

这个提交包含在:
Eugen Rochko
2019-10-07 05:05:02 +02:00
提交者 GitHub
父节点 0336621c80
当前提交 6c9b4f6b77
修改 2 个文件,包含 1 行新增2 行删除
+1 -1
查看文件
@@ -20,7 +20,7 @@ module Mastodon
exit(1)
end
ActiveRecord::Base.configurations[Rails.env]['pool'] = options[:concurrency]
ActiveRecord::Base.configurations[Rails.env]['pool'] = options[:concurrency] + 1
progress = create_progress_bar(scope.count)
pool = Concurrent::FixedThreadPool.new(options[:concurrency])
-1
查看文件
@@ -27,7 +27,6 @@ module Mastodon
dry_run = options[:dry_run] ? '(DRY RUN)' : ''
if options[:all] || username.nil?
processed, = parallelize_with_progress(Account.joins(:user).merge(User.active)) do |account|
PrecomputeFeedService.new.call(account) unless options[:dry_run]
end