implement live game logging

This commit is contained in:
2020-12-22 11:13:01 +01:00
parent f1746445b7
commit 09772130c0
3 changed files with 40 additions and 0 deletions

View File

@@ -102,6 +102,10 @@ def singleEvent():
print("Removed orphaned session file: {}".format(fullPath), file=sys.stderr)
os.remove(fullPath)
# update live stats #
if jsonDict["etype"] == "active_players":
db.logLiveState(jsonDict, session)
if jsonDict["etype"] == ROUND_END_IDENT:
events = []
with open(fullPath, "r") as f: