-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add persistent server storage with MongoDB
- Loading branch information
1 parent
2fdd0da
commit f514046
Showing
4 changed files
with
240 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
from datetime import timedelta | ||
|
||
# Enables detailed tracebacks and an interactive Python console on errors. | ||
# Never use in production! | ||
#DEBUG = True | ||
DEBUG = False | ||
|
||
# Address for development server to listen on | ||
#HOST = "127.0.0.1" | ||
HOST = "127.0.0.1" | ||
# Port for development server to listen on | ||
#PORT = 5000 | ||
PORT = 5000 | ||
|
||
# Makes the server more performant at sending static files when the | ||
# server is being proxied by a server that supports X-Sendfile. | ||
#USE_X_SENDFILE = True | ||
# Amount of time after which servers are removed from the list if they haven't | ||
# updated their listings. Note: By default Minetest servers only announce | ||
# once every 5 minutes, so this should be more than that. | ||
UPDATE_TIME = timedelta(minutes=6) | ||
|
||
# File to store the JSON server list data in. | ||
FILENAME = "list.json" | ||
|
||
# Amount of time, is seconds, after which servers are removed from the list | ||
# if they haven't updated their listings. Note: By default Minetest servers | ||
# only announce once every 5 minutes, so this should be more than 300. | ||
PURGE_TIME = 350 | ||
|
||
# List of banned IP addresses | ||
BANLIST = [] | ||
# Amount of time after which servers are removed from the database if they | ||
# haven't updated their listings. | ||
PURGE_TIME = timedelta(days=30) | ||
|
||
# Creates server entries if a server sends an 'update' and there is no entry yet. | ||
# This should only be used to populate the server list after list.json was deleted. | ||
# This WILL cause problems such as mapgen, mods and privilege information missing from the list | ||
ALLOW_UPDATE_WITHOUT_OLD = False | ||
|
||
# Number of days' data to factor into popularity calculation | ||
POP_DAYS = 3 | ||
|
||
# Address of the MongoDB server. You can use domain sockets on unix. | ||
MONGO_URI = "mongodb://localhost/minetest-master" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
APScheduler>=3 | ||
Flask>=0.10 | ||
Flask-PyMongo>=0.3 | ||
|
Oops, something went wrong.