From 594417dc3d2a9aebf99ffbe510adfa80ae7dbc1d Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Tue, 26 Jan 2016 20:16:57 -0500 Subject: [PATCH] Force create_dt to start_dt for games. There's some drift in the database between the two, when in actuality they should only be milliseconds apart. The start_dt *was* being set via the application and the create_dt with a database default. The values resulting from the defaults were sometimes minutes earlier, which doesn't makes sense. Until the true cause is identified I'll force the two to be the same. --- xonstat/views/submission.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index 79ead37..f63fbd2 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -487,6 +487,11 @@ def create_game(session, start_dt, game_type_cd, server_id, map_id, game.match_id = match_id game.mod = mod[:64] + # There is some drift between start_dt (provided by app) and create_dt + # (default in the database), so we'll make them the same until this is + # resolved. + game.create_dt = start_dt + try: game.duration = datetime.timedelta(seconds=int(round(float(duration)))) except: -- 2.39.2