diff --git a/shingetsu/cache.py b/shingetsu/cache.py index a6f53c0..04a82e2 100644 --- a/shingetsu/cache.py +++ b/shingetsu/cache.py @@ -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 @@ -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: @@ -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): diff --git a/shingetsu/config.py b/shingetsu/config.py index 7e1c3d6..43e7f4f 100644 --- a/shingetsu/config.py +++ b/shingetsu/config.py @@ -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