Sha256: 97dbe13e92f62f0dead53be92b5900707547f5f13874b26d613dc4384a3a32b2

Contents?: true

Size: 377 Bytes

Versions: 1

Compression:

Stored size: 377 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}" }
      `sudo #{cmd}`
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.12 lib/procon_bypass_man/support/renice_command.rb