51 lines
1.8 KiB
Python
51 lines
1.8 KiB
Python
# -*- coding: utf-8 -*-
|
|
import os
|
|
from ops.env import myenv
|
|
|
|
# ad_env = os.getenv('ad_env') or 'prod'
|
|
ad_mysql_pwd = os.getenv('adpwd') or 'vF4j56AfxU3P'
|
|
log_path = "/data/logs"
|
|
if myenv == 'prod':
|
|
redis_company_config = {'host': '10.10.4.8', 'port': 6379, 'db': 13, 'passwd': 'crs-9ltb97ds:i33dkxshh'}
|
|
mysql_promotion_config = {'user': 'ad', 'pswd': ad_mysql_pwd, 'host': '10.10.3.5', 'db': 'ad'}
|
|
ad_list_interface_port = 5014
|
|
priv_i_port=5015
|
|
info_expire = 60 * 60 * 3
|
|
adkey_expire = 60 * 2
|
|
|
|
elif myenv == 'dev':
|
|
redis_company_config = {'host': '192.168.100.20', 'port': 6379, 'db': 2, 'passwd': ''}
|
|
mysql_promotion_config = {'user': 'miles', 'pswd': 'aspect', 'host': '192.168.100.30', 'db': 'test'}
|
|
ad_list_interface_port = 5014
|
|
priv_i_port = 5015
|
|
info_expire = 60 * 60 * 3
|
|
adkey_expire = 60 * 2
|
|
elif myenv == 'test':
|
|
redis_company_config = {'host': '10.10.4.8', 'port': 6379, 'db': 11, 'passwd': 'crs-9ltb97ds:i33dkxshh'}
|
|
mysql_promotion_config = {'user': 'ad', 'pswd': ad_mysql_pwd, 'host': '10.10.3.5', 'db': 'test'}
|
|
log_path = "/data/logs/test/"
|
|
ad_list_interface_port = 6014
|
|
priv_i_port=6015
|
|
info_expire = 60 * 60 * 3
|
|
adkey_expire = 60 * 2
|
|
elif myenv == 'test1':
|
|
redis_company_config = {'host': '10.10.4.8', 'port': 6379, 'db': 12, 'passwd': 'crs-9ltb97ds:i33dkxshh'}
|
|
mysql_promotion_config = {'user': 'ad', 'pswd': ad_mysql_pwd, 'host': '10.10.3.5', 'db': 'test'}
|
|
log_path = "/data/logs/test/"
|
|
ad_list_interface_port = 6014
|
|
priv_i_port=6015
|
|
info_expire = 60 * 2
|
|
adkey_expire = 60 * 2
|
|
else:
|
|
raise Exception("GET config with mysql/redis failed!")
|
|
|
|
expire_time = 7200
|
|
|
|
|
|
BEGIN = '1999-01-01'
|
|
END = '3000-01-01'
|
|
|
|
|
|
# mysql_promotion_config = {'user': 'mytga', 'pswd': 'gzVwh4HGR68G', 'host': '10.10.3.5', 'db': 'games_report'}
|
|
# redis_company_config = {'host': '10.10.3.10', 'port': 6379, 'db': 2}
|