This commit is contained in:
Eden Kirin
2023-03-26 23:59:15 +02:00
parent f74bc9b52e
commit fa2aee881d
6 changed files with 31 additions and 13 deletions

View File

@ -5,14 +5,18 @@ import time
from threading import Thread
from typing import Optional
from hopper.interfaces import SendGameStateInterface
from hopper.models.player import PlayerList
from hopper.ws_server import WSServer
from settings import settings
class InactivityWatchdog(Thread):
def __init__(
self, players: PlayerList, ws_server: Optional[WSServer] = None, *args, **kwargs
self,
players: PlayerList,
ws_server: Optional[SendGameStateInterface] = None,
*args,
**kwargs,
) -> None:
self.players = players
self.ws_server = ws_server