db配置文件move到config

This commit is contained in:
pengtao 2019-10-14 11:43:17 +08:00
parent a5cc781671
commit 0e281fcc91
2 changed files with 6 additions and 6 deletions

View File

@ -3,8 +3,13 @@ import os
ad_env = os.getenv('ad_env') or 'prod'
log_path = "/data/logs"
args = dict()
if ad_env == 'prod':
interface_port = 6500
args['host'] = '10.10.3.5'
args['user'] = 'ops'
args['pswd'] = 'deploy2018'
args['db'] = 'ywplatform'
elif ad_env == 'test':
interface_port = 6600
else:

View File

@ -4,7 +4,7 @@ import logging
from ops.mansible import AnsibleAPI
from ops.mmysql import MysqlBase
import time
from config.config import args
log = logging.getLogger(__name__)
@ -68,11 +68,6 @@ class Build_Gamelog_Config():
def get_ip_addr(self):
ip_addr = list()
sql = f"SELECT run_server FROM `deploy_projectmanage` WHERE project_name='{self.project}' AND env='prod'"
args = dict()
args['host'] = '10.10.3.5'
args['user'] = 'deploy'
args['pswd'] = 'deploy2016'
args['db'] = 'ywplatform'
mdb = MysqlBase(**args)
data = mdb.query(sql)
if data: