add NICe keyword

This commit is contained in:
Ward Wouts 2003-05-26 19:35:04 +00:00
parent 1eac2fa43d
commit d55a83664e
3 changed files with 18 additions and 4 deletions

View file

@ -1,6 +1,6 @@
#!/usr/local/bin/ruby -w
# $Dwarf: ripnews.rb,v 1.60 2003/05/24 12:05:57 ward Exp $
# $Dwarf: ripnews.rb,v 1.61 2003/05/24 18:33:46 ward Exp $
# $Source$
require 'date'
@ -256,6 +256,13 @@ def unlock
File.unlink(@config[group]["LOCKFILE"])
end
def renice
group = @config.keys[0]
if @config[group].has_key?("NICE")
Process.setpriority(Process::PRIO_PROCESS, 0, @config[group]["NICE"].to_i)
end
end
def get_single(subj, group)
print "Fetching singlepart article: #{subj}\n"
body = @articles.get_group_body(subj)
@ -418,6 +425,7 @@ defaults = parse_options(defaults)
parse_config(defaults)
check_config
lock
renice
@maxfilelength = get_max_file_length(@config[@config.keys[0]]["TEMPDIR"])