Skip to content
This repository has been archived by the owner on Jul 19, 2020. It is now read-only.

Commit

Permalink
revert skip fetching records when many spams included
Browse files Browse the repository at this point in the history
  • Loading branch information
fuktommy committed Dec 1, 2012
1 parent 321c1a6 commit 9d32587
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
5 changes: 0 additions & 5 deletions shingetsu/cache.py
Expand Up @@ -591,7 +591,6 @@ def check_data(self, res, stamp=None, id=None, begin=None, end=None):
'''Check a data and add it cache.'''
flag_got = False
flag_spam = False
spam_count = 0
count = 0
for i in res:
count += 1
Expand All @@ -611,7 +610,6 @@ def check_data(self, res, stamp=None, id=None, begin=None, end=None):
self.add_data(r, False)
r.remove()
flag_spam = True
spam_count += 1
else:
self.add_data(r)
else:
Expand All @@ -624,9 +622,6 @@ def check_data(self, res, stamp=None, id=None, begin=None, end=None):
sys.stderr.write("Warning: %s%s: broken record.\n" %
(self.datfile, str_stamp))
r.free()
if spam_count > config.accept_spam_count:
sys.stderr.write("Warning: %s: too many spams. skip fetching it.\n" % self.datfile)
break
return count, flag_got, flag_spam

def get_data(self, stamp=0, id="", node=None):
Expand Down
1 change: 0 additions & 1 deletion shingetsu/config.py
Expand Up @@ -157,7 +157,6 @@ def _get_version():
nodes = 5 # Nodes keeping in node list
share_nodes = 5 # Nodes having the file
search_depth = 30 # Search node size
accept_spam_count = 10
tiedfile_cache_size = 30

broadcast = "../tool/broadcast.py" # Broadcast script path
Expand Down

0 comments on commit 9d32587

Please sign in to comment.