diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-02-22 12:48:38 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-02-22 12:48:38 +0100 |
commit | 32aaaf92f2c06214abdc93e3cede07e067df6b88 (patch) | |
tree | 1b98d9e7605278311aa76880614ba17361f69285 /api/game/socket.py | |
parent | ae4e74ccde82388cca5e874539bb132e23fc1e92 (diff) |
added columns to games + cleanup function
Diffstat (limited to 'api/game/socket.py')
-rw-r--r-- | api/game/socket.py | 3 |
1 files changed, 2 insertions, 1 deletions
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: |