From 362075cb65b4e4d25c9006a08d76e3f51b900a82 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Sun, 2 Dec 2012 08:09:18 -0500 Subject: [PATCH] Explicitly set an update_dt when elos are processed. --- xonstat/elo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xonstat/elo.py b/xonstat/elo.py index 8293c97..60da531 100644 --- a/xonstat/elo.py +++ b/xonstat/elo.py @@ -1,3 +1,4 @@ +import datetime import logging import math import random @@ -185,6 +186,7 @@ def update_elos(game, session, elos, scores, ep): elos[pid].elo = new_elo elos[pid].games += 1 + elos[pid].update_dt = datetime.datetime.utcnow() log.debug("Setting Player {0}'s Elo delta to {1}. Elo is now {2} (was {3}).".format(pid, elo_deltas[pid], new_elo, old_elo)) -- 2.39.2