summaryrefslogtreecommitdiff
path: root/spec/unit/settings/priority_setting_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2014-06-26(PUP-2521) Define Process constants locallyEthan J. Brown1-4/+4
- Previously, Process constants were used in a few locations throughout the code. Capture the needed PRIORITY_CLASS constants in our local Windows Process class, and also define CREATE_NEW_CONSOLE. These constants have moved in new versions of the win32-process gem. - Note that ext/windows/service/daemon.rb doesn't load Puppet code. The daemon only loads what it explicitly needs, so ensure the CREATE_NEW_CONSOLE constant is defined there.
2013-11-01(#21241) Use correct constant for low priorityJosh Cooper1-1/+1
Needs to be BELOW_NORMAL_PRIORITY_CLASS.
2013-09-20(#21241) Set process priority if one is specifiedJosh Cooper1-1/+1
This commit adds a Puppet::Util::Limits module for specifying process priority, and mixes the module into Puppet::Util::CommandLine. Since the CommandLine is the application entry point for puppet it seemed sensible to have it set the process priority there, and to have it done as early as possible. Another option would have been to set the priority in the base Application, after the application-specific settings have been initialized. But this would mean you couldn't set the process priority when puppet executes an ExternalSubcommand-based application. As it stands now, it's not possible to have different priorities for different sections, e.g. agent vs master, in puppet's configuration file.
2013-09-20(#21241) Add a priority settingJosh Cooper1-0/+66
This commit add a `:priority` type of setting that maps generic priority labels to operating system specific priorities, e.g. normal priority is 0 on posix, but 32 on Windows. If the value is specified as an integer, then it is passed as is, so that specific priority levels can be specified. This commit also adds the `priority` setting to the main section of puppet's configuration.