-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
36 lines (27 loc) · 923 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import os
# Flask settings
DEBUG = os.getenv('DEBUG', 'False') == 'True'
HOST = os.getenv('HOST', '0.0.0.0')
PORT = int(os.getenv('PORT', 46423))
# Authentication
# Each request will require their auth token to match, otherwise no data will be added
AUTH_TOKEN = os.getenv('AUTH_TOKEN')
if AUTH_TOKEN is None:
raise ValueError("AUTH_TOKEN environment variable is not set")
# Database
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL', 'sqlite:///app.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False
# Discord Webhook
WEBHOOK_URL = os.getenv('WEBHOOK_URL')
if WEBHOOK_URL is None:
raise ValueError("WEBHOOK_URL environment variable is not set")
# Stats collection interval (in seconds)
STATS_INTERVAL = int(os.getenv('STATS_INTERVAL', 3600)) # 3600 = 1 hour
# Handlers
ENABLED_HANDLERS = [
# Released
'resource-gatherers',
# Unreleased
#'resource-gatherers-custom',
#'build-tools',
]