That was a bad idea. Remove it. 5/head
authorAnt Zucaro <azucaro@gmail.com>
Sun, 17 Sep 2017 15:05:10 +0000 (11:05 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sun, 17 Sep 2017 15:05:10 +0000 (11:05 -0400)
development.ini
production.ini
xonstat/views/server.py

index eff362f..62c9c36 100755 (executable)
@@ -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]
index c3838a1..a2da1cf 100644 (file)
@@ -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
index c443baf..a3e4bf4 100644 (file)
@@ -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):