This commit is contained in:
aozhiwei 2019-01-16 11:48:20 +08:00
parent 710170bbc5
commit 70ffe731f4

View File

@ -7,14 +7,14 @@ void JsonDataMgr::Init()
{
std::string wsproxyserver_cluster_json_file;
std::string targetserver_cluster_json_file;
if (getenv("is_dev_env")) {
if (f8::IsOnlineEnv()) {
wsproxyserver_cluster_json_file = a8::Format("../config/game%d.wsproxy.cluster.json", {GAME_ID});
targetserver_cluster_json_file = a8::Format("../config/game%d.gameserver.cluster.json", {GAME_ID});
} else {
wsproxyserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.wsproxy.cluster.json",
{GAME_ID, GAME_ID});
targetserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.gameserver.cluster.json",
{GAME_ID, GAME_ID});
} else {
wsproxyserver_cluster_json_file = a8::Format("../config/game%d.wsproxy.cluster.json", {GAME_ID});
targetserver_cluster_json_file = a8::Format("../config/game%d.gameserver.cluster.json", {GAME_ID});
}
wsproxyserver_cluster_json_.ReadFromFile(wsproxyserver_cluster_json_file);
targetserver_cluster_json_.ReadFromFile(targetserver_cluster_json_file);