forked from miguelgrinberg/flack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
40 lines (29 loc) · 1 KB
/
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
37
38
39
40
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
DEBUG = False
TESTING = False
SECRET_KEY = os.environ.get('SECRET_KEY',
'51f52814-0071-11e6-a247-000ec6c2372c')
SQLALCHEMY_DATABASE_URI = os.environ.get(
'DATABASE_URL', 'sqlite:///' + os.path.join(basedir, 'db.sqlite'))
SQLALCHEMY_TRACK_MODIFICATIONS = False
REQUEST_STATS_WINDOW = 15
CELERY_CONFIG = {}
SOCKETIO_MESSAGE_QUEUE = os.environ.get(
'SOCKETIO_MESSAGE_QUEUE', os.environ.get('CELERY_BROKER_URL',
'redis://'))
class DevelopmentConfig(Config):
DEBUG = True
class ProductionConfig(Config):
pass
class TestingConfig(Config):
TESTING = True
SQLALCHEMY_DATABASE_URI = 'sqlite://'
CELERY_CONFIG = {'CELERY_ALWAYS_EAGER': True}
SOCKETIO_MESSAGE_QUEUE = None
config = {
'development': DevelopmentConfig,
'production': ProductionConfig,
'testing': TestingConfig
}