From 70ffe731f4eee8e417acb11b77afb68e4e084d89 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 16 Jan 2019 11:48:20 +0800 Subject: [PATCH] 1 --- server/wsproxy/jsondatamgr.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/wsproxy/jsondatamgr.cc b/server/wsproxy/jsondatamgr.cc index 40d62c4..29eadf3 100644 --- a/server/wsproxy/jsondatamgr.cc +++ b/server/wsproxy/jsondatamgr.cc @@ -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);