Fix Heroku variables, and also check REDISTOGO before using defaults.

This commit is contained in:
2015-04-15 22:47:22 +01:00
parent bc989d5ed1
commit eb7e6938af
2 changed files with 3 additions and 3 deletions

View File

@@ -4,11 +4,11 @@
"repository": "https://github.com/nikdoof/evestandings",
"keywords": ["python", "eve online"],
"env": {
"API_KEY_ID": {
"STANDINGS_API_KEY_ID": {
"description": "KeyID of a corporation Director API Key.",
"required": true
},
"API_KEY_VCODE": {
"STANDINGS_API_KEY_VCODE": {
"description": "vCode of a corporation Director API Key.",
"value": "next_action",
"required": false

View File

@@ -6,7 +6,7 @@ from standings.cache import EVEAPIRedisCache
app = Flask(__name__)
app.config['REDIS_URL'] = os.environ.get('REDIS_URL', 'redis://localhost:6379/0')
app.config['REDIS_URL'] = os.environ.get('REDIS_URL', os.environ.get('REDISTOGO_URL', 'redis://localhost:6379/0'))
app.config['API_KEY_ID'] = os.environ.get('STANDINGS_API_KEY_ID')
app.config['API_KEY_VCODE'] = os.environ.get('STANDINGS_API_KEY_VCODE')
redis = Redis(app)