admin
2025-06-04 287c506725b2d970f721f80169f83c2418cb0991
constant.py
@@ -1,6 +1,18 @@
import platform
TEST = False
IS_A = False
##B类##
MIDDLE_SERVER_PORT = 10008
MIDDLE_API_SERVER_PORT = 11008
DATA_SERVER_PORT = 9004
##A类##
if IS_A:
    MIDDLE_SERVER_PORT = 10009
    MIDDLE_API_SERVER_PORT = 11009
    DATA_SERVER_PORT = 9005
# 买入分数分档
BUY_SCORE_RANK_0 = 150
@@ -39,6 +51,14 @@
    # "pwd": "123456"
}
if IS_A:
    REDIS_CONFIG = {
        "host": "172.16.32.8",
        "port": 6379,
        "db": 0,
        "pwd": "Yeshi2016@"
    }
MYSQL_CONFIG = {
    "host": "192.168.3.252",
    "port": 3306,
@@ -55,6 +75,27 @@
    "passwd": "Yeshi2016@"
}
if IS_A:
    MYSQL_CONFIG = {
        "host": "172.16.16.17",
        "port": 3306,
        "database": "gp_a",
        "charset": "utf8",
        "user": "root",
        "passwd": "Yeshi2016@"
    }
if TEST:
    MYSQL_CONFIG = {
        "host": "gz-cdb-r13d0yi9.sql.tencentcdb.com",
        "port": 62929,
        "database": "gp",
        "charset": "utf8",
        "user": "root",
        "passwd": "Yeshi2016@"
    }
LOG_DIR = "logs"
# 获取根路径
def get_path_prefix():