apologiesserver.config

System configuration.

Module Contents

apologiesserver.config.DEFAULT_CONFIG_PATH
apologiesserver.config.DEFAULT_LOGFILE_PATH
apologiesserver.config.DEFAULT_SERVER_HOST = localhost
apologiesserver.config.DEFAULT_SERVER_PORT = 8080
apologiesserver.config.DEFAULT_CLOSE_TIMEOUT_SEC = 10
apologiesserver.config.DEFAULT_WEBSOCKET_LIMIT = 1000
apologiesserver.config.DEFAULT_TOTAL_GAME_LIMIT = 1000
apologiesserver.config.DEFAULT_IN_PROGRESS_GAME_LIMIT = 25
apologiesserver.config.DEFAULT_REGISTERED_PLAYER_LIMIT = 100
apologiesserver.config.DEFAULT_WEBSOCKET_IDLE_THRESH_MIN = 2
apologiesserver.config.DEFAULT_WEBSOCKET_INACTIVE_THRESH_MIN = 5
apologiesserver.config.DEFAULT_PLAYER_IDLE_THRESH_MIN = 15
apologiesserver.config.DEFAULT_PLAYER_INACTIVE_THRESH_MIN = 30
apologiesserver.config.DEFAULT_GAME_IDLE_THRESH_MIN = 10
apologiesserver.config.DEFAULT_GAME_INACTIVE_THRESH_MIN = 20
apologiesserver.config.DEFAULT_GAME_RETENTION_THRESH_MIN = 2880
apologiesserver.config.IDLE_WEBSOCKET_CHECK_PERIOD_SEC = 120
apologiesserver.config.IDLE_WEBSOCKET_CHECK_DELAY_SEC = 300
apologiesserver.config.IDLE_PLAYER_CHECK_PERIOD_SEC = 120
apologiesserver.config.IDLE_PLAYER_CHECK_DELAY_SEC = 300
apologiesserver.config.IDLE_GAME_CHECK_PERIOD_SEC = 120
apologiesserver.config.IDLE_GAME_CHECK_DELAY_SEC = 300
apologiesserver.config.OBSOLETE_GAME_CHECK_PERIOD_SEC = 300
apologiesserver.config.OBSOLETE_GAME_CHECK_DELAY_SEC = 300
apologiesserver.config.DEFAULTS
class apologiesserver.config.SystemConfig

System configuration.

logfile_path

The path to the log file on disk

Type

str

server_host

The hostname to bind to

Type

str

server_port

The server port to listen on

Type

int

close_timeout_sec

The maximum amount of time to wait when closing a connection

Type

int

websocket_limit

Limit on the number of websocket connections

Type

int

total_game_limit

Limit on the total number of tracked games

Type

int

in_progress_game_limit

Limit on the number of in progress games

Type

int

registered_player_limit

Limit on the number of registered players

Type

int

websocket_idle_thresh_min

Number of minutes of no activity before a websocket with no players is considered idle

Type

int

websocket_inactive_thresh_min

Number of minutes of no activity before a websocket with no players is inactive

Type

int

player_idle_thresh_min

Number of minutes of no activity before a player is considered idle

Type

int

player_inactive_thresh_min

Number of minutes of no activity before a player is considered inactive

Type

int

game_idle_thresh_min

Number of minutes of no activity before a game is considered idle

Type

int

game_inactive_thresh_min

Number of minutes of no activity before a game is considered inactive

Type

int

game_retention_thresh_min

Number of minutes to retain data about games after they are completed

Type

int

idle_websocket_check_period_sec

Number of seconds to wait between executions of the Idle Websocket Check task

Type

int

idle_websocket_check_delay_sec

Number of seconds to delay before the first Idle Websocket Check task

Type

int

idle_player_check_period_sec

Number of seconds to wait between executions of the Idle Player Check task

Type

int

idle_player_check_delay_sec

Number of seconds to delay before the first Idle Player Check task

Type

int

idle_game_check_period_sec

Number of seconds to wait between executions of the Idle Game Check task

Type

int

idle_game_check_delay_sec

Number of seconds to delay before the first Idle Player Check task

Type

int

obsolete_game_check_period_sec

Number of seconds to wait between executions of the Obsolete Game Check task

Type

int

obsolete_game_check_delay_sec

Number of seconds to delay before the first Idle Player Check task

Type

int

logfile_path :Optional[str]
server_host :str
server_port :int
close_timeout_sec :int
websocket_limit :int
total_game_limit :int
in_progress_game_limit :int
registered_player_limit :int
websocket_idle_thresh_min :int
websocket_inactive_thresh_min :int
player_idle_thresh_min :int
player_inactive_thresh_min :int
game_idle_thresh_min :int
game_inactive_thresh_min :int
game_retention_thresh_min :int
idle_websocket_check_period_sec :int
idle_websocket_check_delay_sec :int
idle_player_check_period_sec :int
idle_player_check_delay_sec :int
idle_game_check_period_sec :int
idle_game_check_delay_sec :int
obsolete_game_check_period_sec :int
obsolete_game_check_delay_sec :int
to_json() str

Serialize to JSON.

apologiesserver.config.load_config(config_path: Optional[str] = None, overrides: Optional[Dict[str, Any]] = None) None

Load global configuration for later use, applying defaults for any value that is not found.

apologiesserver.config.config() SystemConfig

Return system configuration.