| Server IP : 77.68.64.21 / Your IP : 216.73.217.105 Web Server : Apache System : Linux hp3-wp-1011378.hostingp3.local 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64 User : csh2668128 ( 2112425) PHP Version : 8.1.34 Disable Function : shell_exec,exec,system,popen,set_time_limit MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/ruby/vendor_ruby/puppet/settings/ |
Upload File : |
require 'puppet/settings/base_setting'
# A setting that represents a scheduling priority, and evaluates to an
# OS-specific priority level.
class Puppet::Settings::PrioritySetting < Puppet::Settings::BaseSetting
PRIORITY_MAP =
if Puppet::Util::Platform.windows?
require 'win32/process'
{
:high => Process::HIGH_PRIORITY_CLASS,
:normal => Process::NORMAL_PRIORITY_CLASS,
:low => Process::BELOW_NORMAL_PRIORITY_CLASS,
:idle => Process::IDLE_PRIORITY_CLASS
}
else
{
:high => -10,
:normal => 0,
:low => 10,
:idle => 19
}
end
def type
:priority
end
def munge(value)
return unless value
case
when value.is_a?(Integer)
value
when (value.is_a?(String) and value =~ /\d+/)
value.to_i
when (value.is_a?(String) and PRIORITY_MAP[value.to_sym])
PRIORITY_MAP[value.to_sym]
else
raise Puppet::Settings::ValidationError, "Invalid priority format '#{value.inspect}' for parameter: #{@name}"
end
end
end