summaryrefslogtreecommitdiff
path: root/tools/merge_fetch.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2017-03-02 12:49:18 +0100
committerLinus Nordberg <linus@nordu.net>2017-03-15 17:45:32 +0100
commit8e4cd93fd1ab8fa148256633f3eb261a5bd1d311 (patch)
treee1bcb12360dcbd265fbe2f4f48ef0fa02c9cb3fd /tools/merge_fetch.py
parent2b9e8c620006705a9459a61c88c7c0cd8fb02212 (diff)
Rename to statusserver
Diffstat (limited to 'tools/merge_fetch.py')
-rwxr-xr-xtools/merge_fetch.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/merge_fetch.py b/tools/merge_fetch.py
index 165dee8..2a2491d 100755
--- a/tools/merge_fetch.py
+++ b/tools/merge_fetch.py
@@ -18,9 +18,9 @@ from mergetools import get_logorder, verify_entry, get_new_entries, \
from certtools import timing_point, write_file, create_ssl_context, http_request
import json
-def reportstatus(statsservers, own_key, target, variable, status):
- for statsserver in statsservers:
- do_reportstatus(statsserver["name"], "https://%s/" % statsserver["address"], own_key, target, variable, status)
+def reportstatus(statusservers, own_key, target, variable, status):
+ for statusserver in statusservers:
+ do_reportstatus(statusserver["name"], "https://%s/" % statusserver["address"], own_key, target, variable, status)
def do_reportstatus(node, baseurl, own_key, target, variable, status):
try:
@@ -50,7 +50,7 @@ def merge_fetch(args, config, localconfig, currentsizefile):
"%s/%s-private.pem" % (paths["privatekeys"],
localconfig["nodename"]))
assert(localconfig["nodename"] == config["primarymergenode"])
- statsservers = config.get("statsservers")
+ statusservers = config.get("statusservers")
timing = timing_point()
logorder = get_logorder(logorderfile)
@@ -79,7 +79,7 @@ def merge_fetch(args, config, localconfig, currentsizefile):
new_entries -= certsinlog
print >>sys.stderr, "adding", len(new_entries), "entries"
sys.stderr.flush()
- reportstatus(statsservers, own_key, "fetch", "total", len(certsinlog) + len(new_entries))
+ reportstatus(statusservers, own_key, "fetch", "total", len(certsinlog) + len(new_entries))
for ehash in new_entries:
for storagenode in storagenodes:
@@ -123,7 +123,7 @@ def merge_fetch(args, config, localconfig, currentsizefile):
tree_size = len(logorder)
currentsize = {"index": tree_size - 1, "hash": hexencode(logorder[tree_size-1])}
write_file(currentsizefile, currentsize)
- reportstatus(statsservers, own_key, "fetch", "fetched", tree_size)
+ reportstatus(statusservers, own_key, "fetch", "fetched", tree_size)
print >>sys.stderr, added_entries,
sys.stderr.flush()
print >>sys.stderr
@@ -141,7 +141,7 @@ def merge_fetch(args, config, localconfig, currentsizefile):
sys.stderr.flush()
tree_size = len(logorder)
- reportstatus(statsservers, own_key, "fetch", "fetched", tree_size)
+ reportstatus(statusservers, own_key, "fetch", "fetched", tree_size)
if tree_size == 0:
return (0, '')
else: