summaryrefslogtreecommitdiff
path: root/ascension/ascension.py
diff options
context:
space:
mode:
Diffstat (limited to 'ascension/ascension.py')
-rw-r--r--ascension/ascension.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/ascension/ascension.py b/ascension/ascension.py
index 16ba90d..01cf888 100644
--- a/ascension/ascension.py
+++ b/ascension/ascension.py
@@ -187,12 +187,8 @@ class Ascension():
# 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,
@@ -231,11 +227,11 @@ class Ascension():
self.ns_process = subprocess.Popen(["gnunet-namestore", "-a", "-S"], stdin=subprocess.PIPE, text=True)
start = time.time()
i = 0
+ setcount = len(self.dnszone.zone.nodes.items()))
for name, rdatasets in self.dnszone.zone.nodes.items():
# log if the rdataset is empty for some reason
i += 1
- if i > 100:
- break
+ print("Adding records %d/%d\r"%(i,setcount, end="")
if not rdatasets:
self.logger.warning("Empty Rdataset!")
continue
@@ -272,10 +268,7 @@ class Ascension():
self.logger.info("Added records to /namestore/%s with data %s", domain, record_data)
payload = record_data
self.ns_process.stdin.write(payload.record_name + "." + domain + ":\n")
- i = 0
for r in payload.data:
- print("Adding records %d/%d\r"%(i,len(payload.data)), end="")
- i += 1
flags = "[r{}]".format('p' if not r.is_private else '')
# FIXME we have many more flags. but probably not in our use
# case? We always have relative expirations, for example.