diff options
Diffstat (limited to 'tools/merge_fetch.py')
-rwxr-xr-x | tools/merge_fetch.py | 14 |
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: |