Skip to content

Commit ee4400a

Browse files
committed
describe nice level option, closes #140
1 parent 117e8ef commit ee4400a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## unreleased
44

5+
* Describe `nice` level option [#140](https://github.com/toy/image_optim/issues/140) [@toy](https://github.com/toy)
6+
57
## v0.24.1 (2016-11-20)
68

79
* Use `image_size ~> 1.5` with `apng` detection, so apng images are not optimised to one frame version [#142](https://github.com/toy/image_optim/issues/142) [@toy](https://github.com/toy)

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ optipng:
263263
264264
## Options
265265
266-
* `:nice` — Nice level *(defaults to `10`)*
266+
* `:nice` — Nice level, priority of all used tools with higher value meaning lower priority, in range `-20..19`, negative values can be set only if run by root user *(defaults to `10`)*
267267
* `:threads` — Number of threads or disable *(defaults to number of processors)*
268268
* `:verbose` — Verbose output *(defaults to `false`)*
269269
* `:pack` — Require image\_optim\_pack or disable it, by default image\_optim\_pack will be used if available, will turn on `:skip-missing-workers` unless explicitly disabled *(defaults to `nil`)*

lib/image_optim/runner/option_parser.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ def wrap_regex(width)
133133
options[:threads] = threads
134134
end
135135

136-
op.on('--[no-]nice N', Integer, 'Nice level (defaults to 10)') do |nice|
136+
op.on('--[no-]nice N', Integer, 'Nice level, priority of all used tools '\
137+
'with higher value meaning lower priority, in range -20..19, negative '\
138+
'values can be set only if run by root user (defaults to 10)') do |nice|
137139
options[:nice] = nice
138140
end
139141

0 commit comments

Comments
 (0)