Sha256: a6a505d1ea396c4ee0c24cc33c8b488bdf8c6845ac7eeaab479bf5f02e229f6a

Contents?: true

Size: 573 Bytes

Versions: 32

Compression:

Stored size: 573 Bytes

Contents

module Steep
  module Drivers
    module Utils
      class JobsOption
        attr_accessor :jobs_count, :steep_command, :jobs_count_modifier

        def initialize(jobs_count_modifier: 0)
          @jobs_count_modifier = jobs_count_modifier
        end

        def default_jobs_count
          Concurrent.physical_processor_count + jobs_count_modifier
        end

        def jobs_count_value
          count = jobs_count || default_jobs_count
          if count >= 1
            count
          else
            1
          end
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
steep-1.9.1 lib/steep/drivers/utils/jobs_option.rb
steep-1.9.0 lib/steep/drivers/utils/jobs_option.rb
steep-1.9.0.dev.2 lib/steep/drivers/utils/jobs_option.rb
steep-1.9.0.dev.1 lib/steep/drivers/utils/jobs_option.rb
steep-1.8.3 lib/steep/drivers/utils/jobs_option.rb
steep-1.8.2 lib/steep/drivers/utils/jobs_option.rb
steep-1.8.1 lib/steep/drivers/utils/jobs_option.rb
steep-1.8.0 lib/steep/drivers/utils/jobs_option.rb
steep-1.8.0.pre.2 lib/steep/drivers/utils/jobs_option.rb
steep-1.8.0.pre.1 lib/steep/drivers/utils/jobs_option.rb
steep-1.8.0.dev.2 lib/steep/drivers/utils/jobs_option.rb
steep-1.8.0.dev.1 lib/steep/drivers/utils/jobs_option.rb
steep-1.7.1 lib/steep/drivers/utils/jobs_option.rb
steep-1.7.0 lib/steep/drivers/utils/jobs_option.rb
steep-1.7.0.dev.3 lib/steep/drivers/utils/jobs_option.rb
steep-1.7.0.dev.2 lib/steep/drivers/utils/jobs_option.rb
steep-1.7.0.dev.1 lib/steep/drivers/utils/jobs_option.rb
steep-1.6.0 lib/steep/drivers/utils/jobs_option.rb
steep-1.6.0.pre.4 lib/steep/drivers/utils/jobs_option.rb
steep-1.6.0.pre.3 lib/steep/drivers/utils/jobs_option.rb