diff options
Diffstat (limited to 'ascension/ascension.py')
-rw-r--r-- | ascension/ascension.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ascension/ascension.py b/ascension/ascension.py index 643e20a..16ba90d 100644 --- a/ascension/ascension.py +++ b/ascension/ascension.py @@ -182,13 +182,17 @@ class Ascension(): if not record_data.data: self.logger.warning("Empty record %s", record_data) return - self.logger.debug("Payload: %s", payload.to_json()) + #self.logger.debug("Payload: %s", payload.to_json()) # Replace the records already present in GNS as old ones are not deleted self.logger.debug(payload.record_name + "." + domain + ":\n") self.ns_process.stdin.write(payload.record_name + "." + domain + ":\n") + i = 0 for r in payload.data: flags = "[r{}]".format('p' if not r.is_private else '') + i += 1 + if i > 100: + return # FIXME we have many more flags. but probably not in our use # case? We always have relative expirations, for example. self.logger.debug("{} {} {} {}\n".format(r.record_type, @@ -226,8 +230,12 @@ class Ascension(): # Do it single threaded because threading scares me self.ns_process = subprocess.Popen(["gnunet-namestore", "-a", "-S"], stdin=subprocess.PIPE, text=True) start = time.time() + i = 0 for name, rdatasets in self.dnszone.zone.nodes.items(): # log if the rdataset is empty for some reason + i += 1 + if i > 100: + break if not rdatasets: self.logger.warning("Empty Rdataset!") continue |