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])
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