From 32aaaf92f2c06214abdc93e3cede07e067df6b88 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 22 Feb 2021 12:48:38 +0100 Subject: added columns to games + cleanup function --- api/game/socket.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'api/game/socket.py') diff --git a/api/game/socket.py b/api/game/socket.py index f1a591e..4d6c0de 100644 --- a/api/game/socket.py +++ b/api/game/socket.py @@ -31,7 +31,8 @@ class game: "boardFull": self.board.board_full }) - cursor.execute("update games set moves = moves || ? || ',' where game_id = ?", [column, self.game_id]) + now = int( time.time() * 1000 ) + cursor.execute("update games set last_activity = ?, moves = moves || ? || ',' where game_id = ?", [now, column, self.game_id]) connection.commit() if self.board.board_full: -- cgit v1.2.3