|
@@ -28,11 +28,6 @@ if __name__ == '__main__':
|
|
|
elif cur_env == 'pro':
|
|
|
cf.read("config-pro.ini")
|
|
|
|
|
|
- options = cf.options("Mysql-1")
|
|
|
- items = cf.items("Mysql-1")
|
|
|
- print(options)
|
|
|
- print(items)
|
|
|
-
|
|
|
host1 = cf.get("Mysql-1", 'host')
|
|
|
port1 = int(cf.get("Mysql-1", 'port'))
|
|
|
db1 = cf.get("Mysql-1", 'db')
|
|
@@ -44,17 +39,6 @@ if __name__ == '__main__':
|
|
|
db2 = cf.get("Mysql-2", 'db')
|
|
|
user2 = cf.get("Mysql-2", 'user')
|
|
|
password2 = cf.get("Mysql-2", 'password')
|
|
|
- # host1 = env_dist.get("HOST1", '127.0.0.1')
|
|
|
- # port1 = int(env_dist.get("PORT1", '3306'))
|
|
|
- # db1 = env_dist.get("DB1", 'test')
|
|
|
- # user1 = env_dist.get("USER1", 'root')
|
|
|
- # password1 = env_dist.get("PASSWORD1", 'Qx123456')
|
|
|
-
|
|
|
- # host2 = env_dist.get("HOST2", '127.0.0.1')
|
|
|
- # port2 = int(env_dist.get("PORT2", '3306'))
|
|
|
- # db2 = env_dist.get("DB2", 'test')
|
|
|
- # user2 = env_dist.get("USER2", 'root')
|
|
|
- # password2 = env_dist.get("PASSWORD2", 'Qx123456')
|
|
|
|
|
|
# 日志配置(按照该配置,每次运行时可自动生成运行日期的文件夹, 会在与main同级的)
|
|
|
now_str = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()).replace(":","_")
|