fix sloppy coding

This commit is contained in:
Ward Wouts 2005-02-05 12:35:50 +00:00
parent 89ff654fb9
commit 7a4b33bbda

View file

@ -1,4 +1,4 @@
# $Dwarf: article.rb,v 1.105 2005/02/05 08:26:44 ward Exp $
# $Dwarf: article.rb,v 1.106 2005/02/05 10:48:31 ward Exp $
# $Source$
#
@ -179,15 +179,17 @@ def get_articles(cachedir=false)
# spul dat echt te oud is gaat nooit gevuld worden, dus doe ook geen poging het op te halen
# wil wel wat ophalen aangezien logging aantoont dat er wel oudere articles gedownload worden
articles = @connections[server]["last"] - @connections[server]["first"]
if articles > 10000
fillerend = (@connections[server]["last"] - (articles/10)).to_i
else
fillerend = @connections[server]["last"] - 1000
end
if fillerend > @connections[server]["skip_ids"].min
@connections[server]["skip_ids"] = @connections[server]["skip_ids"].union("#{@connections[server]["skip_ids"].min}-#{fillerend}")
# p "filling #{@connections[server]["skip_ids"].min}-#{fillerend}"
for server in @connections.keys
articles = @connections[server]["last"] - @connections[server]["first"]
if articles > 10000
fillerend = (@connections[server]["last"] - (articles/10)).to_i
else
fillerend = @connections[server]["last"] - 1000
end
if fillerend > @connections[server]["skip_ids"].min
@connections[server]["skip_ids"] = @connections[server]["skip_ids"].union("#{@connections[server]["skip_ids"].min}-#{fillerend}")
# p "filling #{@connections[server]["skip_ids"].min}-#{fillerend}"
end
end
for server in @connections.keys