-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.py
39 lines (34 loc) · 1.15 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
import os
class Config(object):
APP_ID = os.environ.get('')
APP_SECRET = os.environ.get('')
SECRET_KEY = '1lin24'
class DevConfig(Config):
BASE_URL = 'your_ip_address_for_dev'
# 数据库信息从环境变量取
#SQLALCHEMY_DATABASE_URI = os.environ.get('key')
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://demo:demo_pwd@localhost:3306/demo'
SCHEDULER_API_ENABLED = True
SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_POOL_SIZE = 50
SQLALCHEMY_POOL_TIMEOUT = 10
SQLALCHEMY_POOL_RECYCLE = 50
SQLALCHEMY_MAX_OVERFLOW = 50
DEBUG = True
class ProConfig(Config):
BASE_URL = 'your_ip_address_for_pro'
# 数据库信息从环境变量取
#SQLALCHEMY_DATABASE_URI = os.environ.get('key')
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://demo:demo_pwd@localhost:3306/demo'
SCHEDULER_API_ENABLED = True
SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_POOL_SIZE = 50
SQLALCHEMY_POOL_TIMEOUT = 10
SQLALCHEMY_POOL_RECYCLE = 50
SQLALCHEMY_MAX_OVERFLOW = 50
DEBUG = False
config = {
'dev' : DevConfig,
'pro' : ProConfig,
'default' : DevConfig
}