From: Ant Zucaro Date: Sun, 17 Sep 2017 15:05:10 +0000 (-0400) Subject: That was a bad idea. Remove it. X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonstat.git;a=commitdiff_plain;h=d365227ef7ea7bfc05454d94a98819f17c7741ae That was a bad idea. Remove it. --- diff --git a/development.ini b/development.ini index eff362f..62c9c36 100755 --- a/development.ini +++ b/development.ini @@ -36,20 +36,6 @@ xonstat.leaderboard_lifetime = 30 # Note: the default is true xonstat.verify_requests = false -# similar to the above variables, but for server-specific views - -# how far back to go when fetching server statistics -xonstat.servers.leaderboard_lifetime = 30 - -# how many entries on the leaderboard to show -xonstat.servers.leaderboard_count = 10 - -# how many server entries to show per page -xonstat.servers.index_count = 20 - -# how many recent games to show -xonstat.servers.recent_games_count = 20 - ##### END XONSTAT CONFIG SETTINGS ##### [pipeline:main] diff --git a/production.ini b/production.ini index c3838a1..a2da1cf 100644 --- a/production.ini +++ b/production.ini @@ -19,10 +19,6 @@ cache.hourly_term.expire = 3600 xonstat.minimum_required_players = 2 xonstat.leaderboard_lifetime = 7 xonstat.verify_requests = true -xonstat.servers.leaderboard_lifetime = 30 -xonstat.servers.leaderboard_count = 10 -xonstat.servers.index_count = 20 -xonstat.servers.recent_games_count = 20 [filter:weberror] use = egg:WebError#error_catcher diff --git a/xonstat/views/server.py b/xonstat/views/server.py index c443baf..a3e4bf4 100644 --- a/xonstat/views/server.py +++ b/xonstat/views/server.py @@ -4,7 +4,6 @@ import sqlalchemy.sql.expression as expr from collections import namedtuple from datetime import datetime, timedelta from pyramid.httpexceptions import HTTPNotFound -from pyramid.registry import Registry from sqlalchemy import func as fg from webhelpers.paginate import Page from xonstat.models import DBSession, Player, Server, Map, Game, PlayerGameStat @@ -15,11 +14,10 @@ log = logging.getLogger(__name__) # Defaults -settings = Registry.settings -LEADERBOARD_LIFETIME = int(settings.get("xonstat.servers.leaderboard_lifetime", 30)) -LEADERBOARD_COUNT = int(settings.get("xonstat.servers.leaderboard_count", 10)) -INDEX_COUNT = int(settings.get("xonstat.servers.index_count", 20)) -RECENT_GAMES_COUNT = int(settings.get("xonstat.servers.recent_games_count", 20)) +LEADERBOARD_LIFETIME = 30 +LEADERBOARD_COUNT = 10 +INDEX_COUNT = 20 +RECENT_GAMES_COUNT = 20 class ServerIndex(object):