Remove the stub_stdout wrapper around CLI specs (#28340)
				
					
				
			This commit is contained in:
		@@ -42,7 +42,13 @@ module Mastodon::CLI
 | 
			
		||||
 | 
			
		||||
      pool      = Concurrent::FixedThreadPool.new(options[:concurrency], max_queue: options[:concurrency] * 10)
 | 
			
		||||
      importers = indices.index_with { |index| "Importer::#{index.name}Importer".constantize.new(batch_size: options[:batch_size], executor: pool) }
 | 
			
		||||
      progress  = ProgressBar.create(total: nil, format: '%t%c/%u |%b%i| %e (%r docs/s)', autofinish: false)
 | 
			
		||||
      progress  = ProgressBar.create(
 | 
			
		||||
        {
 | 
			
		||||
          total: nil,
 | 
			
		||||
          format: '%t%c/%u |%b%i| %e (%r docs/s)',
 | 
			
		||||
          autofinish: false,
 | 
			
		||||
        }.merge(progress_output_options)
 | 
			
		||||
      )
 | 
			
		||||
 | 
			
		||||
      Chewy::Stash::Specification.reset! if options[:reset_chewy]
 | 
			
		||||
 | 
			
		||||
@@ -116,5 +122,9 @@ module Mastodon::CLI
 | 
			
		||||
      say('Cannot run with this batch_size setting, must be at least 1', :red)
 | 
			
		||||
      exit(1)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def progress_output_options
 | 
			
		||||
      Rails.env.test? ? { output: ProgressBar::Outputs::Null } : {}
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user