fix sloppy coding
This commit is contained in:
parent
89ff654fb9
commit
7a4b33bbda
1 changed files with 12 additions and 10 deletions
|
|
@ -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$
|
# $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
|
# 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
|
# wil wel wat ophalen aangezien logging aantoont dat er wel oudere articles gedownload worden
|
||||||
articles = @connections[server]["last"] - @connections[server]["first"]
|
for server in @connections.keys
|
||||||
if articles > 10000
|
articles = @connections[server]["last"] - @connections[server]["first"]
|
||||||
fillerend = (@connections[server]["last"] - (articles/10)).to_i
|
if articles > 10000
|
||||||
else
|
fillerend = (@connections[server]["last"] - (articles/10)).to_i
|
||||||
fillerend = @connections[server]["last"] - 1000
|
else
|
||||||
end
|
fillerend = @connections[server]["last"] - 1000
|
||||||
if fillerend > @connections[server]["skip_ids"].min
|
end
|
||||||
@connections[server]["skip_ids"] = @connections[server]["skip_ids"].union("#{@connections[server]["skip_ids"].min}-#{fillerend}")
|
if fillerend > @connections[server]["skip_ids"].min
|
||||||
# p "filling #{@connections[server]["skip_ids"].min}-#{fillerend}"
|
@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
|
end
|
||||||
|
|
||||||
for server in @connections.keys
|
for server in @connections.keys
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue