Sha256: cf767feafc8bd4badffe5ebff2707d7f75d74519b82f5b1a69d9fcc441f09245

Contents?: true

Size: 372 Bytes

Versions: 14

Compression:

Stored size: 372 Bytes

Contents

module ProconBypassMan
  class ReniceCommand
    def self.change_priority(to: , pid: )
      cmd =
        case to
        when :high
          "renice -n -20 -p #{pid}"
        when :low
          "renice -n 20 -p #{pid}"
        else
          raise "unknown priority"
        end
      ProconBypassMan.logger.debug { "[SHELL] #{cmd}" }
      `#{cmd}`
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.11 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.10 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.9 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.8.1 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.8 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.7 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.6 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.5 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.4 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.3.1 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.3 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.2 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.1 lib/procon_bypass_man/support/renice_command.rb
procon_bypass_man-0.3.0 lib/procon_bypass_man/support/renice_command.rb