forked from pencil1/ApiTestManage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
43 lines (32 loc) · 1.18 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
41
42
43
# encoding: utf-8
import os
from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore
from apscheduler.executors.pool import ThreadPoolExecutor, ProcessPoolExecutor
basedir = os.path.abspath(os.path.dirname(__file__))
jobstores = {
'default': SQLAlchemyJobStore(url="sqlite:///" + os.path.join(basedir, "data.sqlite")),
}
executors = {
'default': ThreadPoolExecutor(10),
'processpool': ProcessPoolExecutor(3)
}
class Config:
SECRET_KEY = 'BaSeQuie'
basedir = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(basedir, "data.sqlite")
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_TRACK_MODIFICATIONS = False
CSRF_ENABLED = True
UPLOAD_FOLDER = '/upload'
DEBUG = True
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
# SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \
# 'sqlite:/// http://192.168.6.19/data.sqlite'
SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \
'sqlite:///' + os.path.join(basedir, 'data.sqlite')
config = {
'default': DevelopmentConfig
}