diff --git a/games/game.html b/games/game.html index 5d93e0689..41b0a076e 100644 --- a/games/game.html +++ b/games/game.html @@ -54,6 +54,7 @@

Module server.games.game

resolve_game ) from server.rating import InclusiveRange, RatingType +from server.timing import datetime_now from ..players import Player, PlayerState from .typedefs import ( @@ -106,6 +107,7 @@

Module server.games.game

self._game_stats_service = game_stats_service self.game_service = game_service self._player_options: dict[int, dict[str, Any]] = defaultdict(dict) + self.hosted_at = None self.launched_at = None self.finished = False self._logger = logging.getLogger( @@ -292,6 +294,7 @@

Module server.games.game

def set_hosted(self): self._hosted_future.set_result(None) + self.hosted_at = datetime_now() async def add_result( self, @@ -922,6 +925,7 @@

Module server.games.game

"host": self.host.login if self.host else "", "num_players": len(connected_players), "max_players": self.max_players, + "hosted_at": self.hosted_at.isoformat() if self.hosted_at else None, "launched_at": self.launched_at, "rating_type": self.rating_type, "rating_min": self.displayed_rating_range.lo, @@ -1025,6 +1029,7 @@

Classes

self._game_stats_service = game_stats_service self.game_service = game_service self._player_options: dict[int, dict[str, Any]] = defaultdict(dict) + self.hosted_at = None self.launched_at = None self.finished = False self._logger = logging.getLogger( @@ -1211,6 +1216,7 @@

Classes

def set_hosted(self): self._hosted_future.set_result(None) + self.hosted_at = datetime_now() async def add_result( self, @@ -1841,6 +1847,7 @@

Classes

"host": self.host.login if self.host else "", "num_players": len(connected_players), "max_players": self.max_players, + "hosted_at": self.hosted_at.isoformat() if self.hosted_at else None, "launched_at": self.launched_at, "rating_type": self.rating_type, "rating_min": self.displayed_rating_range.lo, @@ -2789,7 +2796,8 @@

Params

Expand source code
def set_hosted(self):
-    self._hosted_future.set_result(None)
+ self._hosted_future.set_result(None) + self.hosted_at = datetime_now()
@@ -2877,6 +2885,7 @@

Params

"host": self.host.login if self.host else "", "num_players": len(connected_players), "max_players": self.max_players, + "hosted_at": self.hosted_at.isoformat() if self.hosted_at else None, "launched_at": self.launched_at, "rating_type": self.rating_type, "rating_min": self.displayed_rating_range.lo, diff --git a/games/index.html b/games/index.html index afa40ae85..b900f9feb 100644 --- a/games/index.html +++ b/games/index.html @@ -449,6 +449,7 @@

Class variables

self._game_stats_service = game_stats_service self.game_service = game_service self._player_options: dict[int, dict[str, Any]] = defaultdict(dict) + self.hosted_at = None self.launched_at = None self.finished = False self._logger = logging.getLogger( @@ -635,6 +636,7 @@

Class variables

def set_hosted(self): self._hosted_future.set_result(None) + self.hosted_at = datetime_now() async def add_result( self, @@ -1265,6 +1267,7 @@

Class variables

"host": self.host.login if self.host else "", "num_players": len(connected_players), "max_players": self.max_players, + "hosted_at": self.hosted_at.isoformat() if self.hosted_at else None, "launched_at": self.launched_at, "rating_type": self.rating_type, "rating_min": self.displayed_rating_range.lo, @@ -2213,7 +2216,8 @@

Params

Expand source code
def set_hosted(self):
-    self._hosted_future.set_result(None)
+ self._hosted_future.set_result(None) + self.hosted_at = datetime_now()
@@ -2301,6 +2305,7 @@

Params

"host": self.host.login if self.host else "", "num_players": len(connected_players), "max_players": self.max_players, + "hosted_at": self.hosted_at.isoformat() if self.hosted_at else None, "launched_at": self.launched_at, "rating_type": self.rating_type, "rating_min": self.displayed_rating_range.lo,