|
|
# -*- coding: utf-8 -*-
|
|
|
import os
|
|
|
|
|
|
# sqlalchemy
|
|
|
SQLALCHEMY_ECHO = 0
|
|
|
|
|
|
# db mysql
|
|
|
mysql_app = {
|
|
|
"host": "127.0.0.1:3306",
|
|
|
"database": "",
|
|
|
"user": "root",
|
|
|
"password": "",
|
|
|
"time_zone": "+8:00"
|
|
|
}
|
|
|
|
|
|
SQLALCHEMY_POOL_SIZE = 10 * os.cpu_count() # 连接池的大小
|
|
|
SQLALCHEMY_POOL_MAX_SIZE = 2 * SQLALCHEMY_POOL_SIZE # 连接池的最大大小
|
|
|
SQLALCHEMY_POOL_RECYCLE = 3600 # 连接池的回收时间
|
|
|
|
|
|
redis_app = ("127.0.0.1", 6382, 0, "")
|
|
|
|
|
|
redis_app_cluster_notes = [
|
|
|
{"host": "127.0.0.1", "port": "6379"},
|
|
|
{"host": "127.0.0.1", "port": "6380"}
|
|
|
]
|
|
|
redis_cluster_pwd = ""
|
|
|
redis_cluster = 0
|
|
|
|
|
|
# redis_sentinel = 1
|
|
|
# redis_sentinel_nodes = [
|
|
|
# ('192.168.0.1', 40500),
|
|
|
# ('192.168.0.2', 40500)
|
|
|
# ]
|
|
|
# redis_sentinel_master = ""
|
|
|
# redis_sentinel_pwd = ""
|
|
|
|
|
|
# session expire duration
|
|
|
session_ttl = 3600
|
|
|
session_key_prefix = "system:user:jid:%s"
|
|
|
|
|
|
# convert get to post
|
|
|
app_get_to_post = False
|
|
|
|
|
|
# system host
|
|
|
host = "https://gap.sst.com"
|
|
|
# api root
|
|
|
api_root = "https://gap.sst.com"
|
|
|
api_prefix = "/api/v1"
|
|
|
api_prefix_v2 = "/api/v2"
|
|
|
|
|
|
# api freq limit
|
|
|
api_count_in_ten_second = 20
|
|
|
|
|
|
login_url = "/login"
|
|
|
cookie_domain = ".sst.com"
|
|
|
# cookie_domain = "localhost"
|
|
|
|
|
|
# cookie_secret, generate method : base64.b64encode(uuid.uuid4().bytes + uuid.uuid4().bytes)
|
|
|
cookie_secret = "rn43LMFOQJu1w8lJXlN93Oc7GOqo3kiTvqOq4IrTDjk="
|
|
|
cookie_path = "/"
|
|
|
cookie_key = "system:jsessionid"
|
|
|
|
|
|
secure_cookie_name = "sst"
|
|
|
|
|
|
pwd_error_limit = 10
|
|
|
|
|
|
enable_curl_async_http_client = True
|
|
|
max_clients = 300
|
|
|
|
|
|
remote_request_timeout = 10.0 # 异步调用远程api超时时间 单位:Second
|
|
|
remote_connect_timeout = 10.0 # 异步调用远程api连接超时时间,单位Second
|
|
|
|
|
|
|
|
|
# 系统密码加密秘钥
|
|
|
pwd_aes_key = "FquMBlcVoIkTAmL7"
|
|
|
|
|
|
enterprise_aes_key = "FquMBlcVoIkTAmL7"
|
|
|
|
|
|
file_upload_dir = "/data/fileupload"
|
|
|
|
|
|
rsa_public_file = "/data/app/public"
|
|
|
rsa_license_file = "/data/app/license"
|
|
|
|
|
|
# hashlib.sha256(base64.b64encode(uuid.uuid4().bytes + uuid.uuid4().bytes)).hexdigest()
|
|
|
|
|
|
# 线上配置信息,使用settings_local.py
|
|
|
try:
|
|
|
from settings_local import *
|
|
|
except:
|
|
|
pass
|