From e9f2dc9c59d18f837b08f5349bce026deb9a6f9d Mon Sep 17 00:00:00 2001 From: Hannes Verschore Date: Tue, 7 Mar 2017 02:57:46 -0800 Subject: [PATCH] Fix updater --- server/data.py | 8 ++++++++ server/update.py | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/server/data.py b/server/data.py index 66f163f..e2cd472 100644 --- a/server/data.py +++ b/server/data.py @@ -172,6 +172,14 @@ class Context(object): return o def exportSuites(self): + o = { } + for b in self.benchmarks: + if b.visible == 2: + continue + o[b.name] = b.export() + return o + + def exportSuitesAll(self): o = { } for b in self.benchmarks: o[b.name] = b.export() diff --git a/server/update.py b/server/update.py index 74af38d..132ae86 100644 --- a/server/update.py +++ b/server/update.py @@ -340,6 +340,15 @@ def export_master(cx): with open(path, 'w') as fp: fp.write(text) + j["suites"] = cx.exportSuitesAll() + text = "var AWFYMaster = " + json.dumps(j) + ";\n" + + path = os.path.join(awfy.path, 'auth-master.js') + if os.path.exists(path): + os.remove(path) + with open(path, 'w') as fp: + fp.write(text) + def update_all(cx): for machine in cx.machines: # Don't try to update machines that we're no longer tracking.