beetje messages om heuken

This commit is contained in:
Ward Wouts 2005-12-06 21:43:21 +00:00
parent 46f53182a3
commit 45d000b794

View file

@ -226,9 +226,7 @@ def get_articles(cachedir=false)
@connections[server]["first"] = first ? first.to_i : 0
@connections[server]["last"] = last ? last.to_i : 0
if Debuglevel > 0
print " Server: #{server}\n"
print " First: #{first}\n"
print " Last: #{last}\n"
print " Server: #{server} First: #{first} Last: #{last}\n"
end
# clean up old newsrc entries
if @connections[server]["first"] > 0
@ -248,7 +246,7 @@ def get_articles(cachedir=false)
if @connections[server]["skip_ids"].max && @connections[server]["skip_ids"].max < @connections[server]["last"]
articles = @connections[server]["last"] - @connections[server]["first"]
if articles > 10000
fillerend = (@connections[server]["skip_ids"].max - (articles/5)).to_i
fillerend = (@connections[server]["skip_ids"].max - (articles/3)).to_i
else
fillerend = @connections[server]["skip_ids"].max - 2000
end
@ -627,7 +625,6 @@ end
def group_is_complete(subj)
group_subjects unless @grouped
#print "Subject: #{subj}\n"
print "length: #{@groups[subj]["messageinfo"].length} total: #{@groups[subj]["total"].to_i}\n" if Debuglevel > 1
messids = []
@groups[subj]["messageinfo"].each {|x|
messids.push(x[:messid])
@ -721,10 +718,11 @@ def set_skip_ids(server, ids)
end
def group_update_newsrc(subject)
# print "running group_update_newsrc\n";
for i in (0...@groups[subject]["messageinfo"].length)
if @connections[@groups[subject]["messageinfo"][i][:server]]
@connections[@groups[subject]["messageinfo"][i][:server]]["newsrc"].mark(@group, @groups[subject]["messageinfo"][i][:id])
#p @group
#p @groups[subject]["messageinfo"][i][:id]
end
end
end
@ -753,8 +751,7 @@ def cache_check(cachedir)
end
def cache_read(cachedir)
p "reading & scrubbing cache"
p Time.now
puts "#{Time.now} Reading & scrubbing caches"
filename = "#{cachedir}/#{@group}.ripnewscache"
excludes = {}
regexp = Regexp.new('^([^\|]*)\|([^\|]*)\|(.*)')
@ -762,8 +759,7 @@ p Time.now
first = @connections[server]["first"]
last = @connections[server]["last"]
#cache_scrub(cachedir, server)
puts " reading cache for #{server}"
puts " #{Time.now}"
puts " #{Time.now} Reading cache for #{server}"
excludes[server] = {}
@connections[server]["skip_ids"].elements.collect!{|x| excludes[server][x]=true}
if FileTest.directory?( cachedir) and FileTest.file?( "#{filename}.#{server}" ) and FileTest.readable?( "#{filename}.#{server}" )
@ -785,14 +781,13 @@ puts " #{Time.now}"
end
}
if ( File.move("#{filename}.#{server}.new", "#{filename}.#{server}") )
print "Cache scrubbed for #{server}\n"
print " #{Time.now} Cache scrubbed for #{server}\n"
else
print "Couldn't scrub #{server} cache\n"
end
end
end
p "caches read"
p Time.now
puts "#{Time.now} Caches read"
#memusage
end