From: Ant Zucaro Date: Sun, 2 Dec 2012 13:09:18 +0000 (-0500) Subject: Explicitly set an update_dt when elos are processed. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=362075cb65b4e4d25c9006a08d76e3f51b900a82;p=xonotic%2Fxonstat.git Explicitly set an update_dt when elos are processed. --- 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))