save the cache for every 10000 headers recieved
This commit is contained in:
parent
bc42886d52
commit
cf1c476d54
1 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#################################
|
||||
#
|
||||
# $Dwarf: article.rb,v 1.71 2003/07/13 09:52:53 ward Exp $
|
||||
# $Dwarf: article.rb,v 1.72 2003/07/13 10:38:53 ward Exp $
|
||||
# $Source$
|
||||
#
|
||||
# article.rb
|
||||
|
|
@ -126,6 +126,7 @@ def get_articles(cachedir=false)
|
|||
print "rangelist elements: #{range.diff(@connections[server]["skip_ids"]).elements}\n" if Debuglevel > 2
|
||||
begin
|
||||
unless rangelist == nil or rangelist =~ /^$/
|
||||
headerlines = 0
|
||||
for i in rangelist.split(',')
|
||||
print "i: #{i}\n" if Debuglevel > 2
|
||||
begin
|
||||
|
|
@ -153,6 +154,11 @@ def get_articles(cachedir=false)
|
|||
add(art[id]["messid"], id, server, art[id]["subject"])
|
||||
end
|
||||
end
|
||||
headerlines += subj_lines.length
|
||||
if headerlines >= 10000
|
||||
save_cache(cachedir)
|
||||
headerlines = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
rescue PermError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue