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(): | |||
182 | if not record_data.data: | 182 | if not record_data.data: |
183 | self.logger.warning("Empty record %s", record_data) | 183 | self.logger.warning("Empty record %s", record_data) |
184 | return | 184 | return |
185 | self.logger.debug("Payload: %s", payload.to_json()) | 185 | #self.logger.debug("Payload: %s", payload.to_json()) |
186 | 186 | ||
187 | # Replace the records already present in GNS as old ones are not deleted | 187 | # Replace the records already present in GNS as old ones are not deleted |
188 | self.logger.debug(payload.record_name + "." + domain + ":\n") | 188 | self.logger.debug(payload.record_name + "." + domain + ":\n") |
189 | self.ns_process.stdin.write(payload.record_name + "." + domain + ":\n") | 189 | self.ns_process.stdin.write(payload.record_name + "." + domain + ":\n") |
190 | i = 0 | ||
190 | for r in payload.data: | 191 | for r in payload.data: |
191 | flags = "[r{}]".format('p' if not r.is_private else '') | 192 | flags = "[r{}]".format('p' if not r.is_private else '') |
193 | i += 1 | ||
194 | if i > 100: | ||
195 | return | ||
192 | # FIXME we have many more flags. but probably not in our use | 196 | # FIXME we have many more flags. but probably not in our use |
193 | # case? We always have relative expirations, for example. | 197 | # case? We always have relative expirations, for example. |
194 | self.logger.debug("{} {} {} {}\n".format(r.record_type, | 198 | self.logger.debug("{} {} {} {}\n".format(r.record_type, |
@@ -226,8 +230,12 @@ class Ascension(): | |||
226 | # Do it single threaded because threading scares me | 230 | # Do it single threaded because threading scares me |
227 | self.ns_process = subprocess.Popen(["gnunet-namestore", "-a", "-S"], stdin=subprocess.PIPE, text=True) | 231 | self.ns_process = subprocess.Popen(["gnunet-namestore", "-a", "-S"], stdin=subprocess.PIPE, text=True) |
228 | start = time.time() | 232 | start = time.time() |
233 | i = 0 | ||
229 | for name, rdatasets in self.dnszone.zone.nodes.items(): | 234 | for name, rdatasets in self.dnszone.zone.nodes.items(): |
230 | # log if the rdataset is empty for some reason | 235 | # log if the rdataset is empty for some reason |
236 | i += 1 | ||
237 | if i > 100: | ||
238 | break | ||
231 | if not rdatasets: | 239 | if not rdatasets: |
232 | self.logger.warning("Empty Rdataset!") | 240 | self.logger.warning("Empty Rdataset!") |
233 | continue | 241 | continue |