disable removeing cound of stale games in the backend because redis is doing it
Build and Push Docker Container / build-and-push (push) Successful in 1m1s
Build and Push Docker Container / build-and-push (push) Successful in 1m1s
This commit is contained in:
@@ -9,6 +9,7 @@ class ServerMetricsCollector:
|
|||||||
self._stale_game_timeout_sec = stale_game_timeout_sec
|
self._stale_game_timeout_sec = stale_game_timeout_sec
|
||||||
self._game_last_seen_unix = game_last_seen_unix
|
self._game_last_seen_unix = game_last_seen_unix
|
||||||
self._game_move_counts = game_move_counts
|
self._game_move_counts = game_move_counts
|
||||||
|
self._metrics_backend_is_redis = metrics_backend.strip().lower() == 'redis'
|
||||||
self._metrics = {
|
self._metrics = {
|
||||||
'games_started': 0,
|
'games_started': 0,
|
||||||
'games_ended': 0,
|
'games_ended': 0,
|
||||||
@@ -101,6 +102,8 @@ class ServerMetricsCollector:
|
|||||||
await self._auto_publish()
|
await self._auto_publish()
|
||||||
|
|
||||||
async def record_stuck_removed(self) -> None:
|
async def record_stuck_removed(self) -> None:
|
||||||
|
if self._metrics_backend_is_redis:
|
||||||
|
return
|
||||||
self._metrics['games_stuck_removed'] += 1
|
self._metrics['games_stuck_removed'] += 1
|
||||||
await self._auto_publish()
|
await self._auto_publish()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user