threshold mechanism for checking how much of a post is on the first server

This commit is contained in:
Ward Wouts 2005-11-06 11:50:30 +00:00
parent 68418615fe
commit 20a423aac8
3 changed files with 31 additions and 11 deletions

View file

@ -698,18 +698,23 @@ def main
elsif !(@config[group].has_key?("-X") and i =~ /#{@config[group]["-X"]}/) and
i =~ /#{@config[group]["-I"]}/
print "Match: #{i}\n" if Debuglevel > 0
if @articles.group_is_complete(i) && @articles.group_percentage_primary(i)
begin
if @articles.group_is_singlepart(i)
get_single(i, group)
elsif @articles.group_is_multipart(i)
get_multi(i, group)
if @articles.group_is_complete(i)
if @articles.group_percentage_primary(i) >= ( @config[group].has_key?("PRIMARYTHRES") ?
@config[group]["PRIMARYTHRES"].to_i : 0 )
begin
if @articles.group_is_singlepart(i)
get_single(i, group)
elsif @articles.group_is_multipart(i)
get_multi(i, group)
end
rescue TempError, PermError, YencError
print "#{$!}\n"
print " Skipping article...\n"
#print "Caught #{$!.class}\n"
#print "Error: #{$!}\n"
end
rescue TempError, PermError, YencError
print "#{$!}\n"
print " Skipping article...\n"
#print "Caught #{$!.class}\n"
#print "Error: #{$!}\n"
else
print "Only #{@articles.group_percentage_primary(i)}% of post on primary server, skipping #{i}\n"
end
else
print "Not complete: #{i}\n"