1
This commit is contained in:
parent
7f7e773ab2
commit
ab595fbafb
@ -11,56 +11,58 @@ void JsonDataMgr::Init()
|
|||||||
node_host_mutex_ = new std::mutex();
|
node_host_mutex_ = new std::mutex();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string wsproxyserver_cluster_json_file;
|
if (!f8::IsOnlineEnv()) {
|
||||||
std::string masterserver_cluster_json_file;
|
if (f8::IsTestEnv()) {
|
||||||
std::string targetserver_cluster_json_file;
|
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/wsproxy.test",
|
||||||
std::string routing_tables_json_file;
|
|
||||||
if (f8::IsOnlineEnv()) {
|
|
||||||
#if MASTER_MODE
|
|
||||||
wsproxyserver_cluster_json_file = a8::Format("../config/node%d/game%d.wsproxy.cluster.json",
|
|
||||||
{
|
{
|
||||||
App::Instance()->node_id,
|
GAME_ID,
|
||||||
|
App::Instance()->instance_id,
|
||||||
GAME_ID
|
GAME_ID
|
||||||
});
|
});
|
||||||
masterserver_cluster_json_file = a8::Format("../config/node%d/game%d.masterserver.cluster.json",
|
|
||||||
{
|
|
||||||
App::Instance()->node_id,
|
|
||||||
GAME_ID
|
|
||||||
});
|
|
||||||
routing_tables_json_file = a8::Format("../config/routing_tables.json",
|
|
||||||
{
|
|
||||||
});
|
|
||||||
#else
|
|
||||||
wsproxyserver_cluster_json_file = a8::Format("../config/game%d.wsproxy.cluster.json", {GAME_ID});
|
|
||||||
masterserver_cluster_json_file = a8::Format("../config/game%d.masterserver.cluster.json", {GAME_ID});
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
|
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/wsproxy.dev",
|
||||||
|
{
|
||||||
|
GAME_ID,
|
||||||
|
App::Instance()->instance_id,
|
||||||
|
GAME_ID
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string wsproxyserver_cluster_json_file;
|
||||||
#if MASTER_MODE
|
#if MASTER_MODE
|
||||||
wsproxyserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/node%d/game%d.wsproxy.cluster.json",
|
std::string masterserver_cluster_json_file;
|
||||||
|
std::string routing_tables_json_file;
|
||||||
|
wsproxyserver_cluster_json_file = a8::Format("%s/node%d/game%d.wsproxy.cluster.json",
|
||||||
{
|
{
|
||||||
|
work_path_,
|
||||||
GAME_ID,
|
GAME_ID,
|
||||||
App::Instance()->node_id,
|
App::Instance()->node_id,
|
||||||
GAME_ID
|
GAME_ID
|
||||||
});
|
});
|
||||||
masterserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/node%d/game%d.masterserver.cluster.json",
|
masterserver_cluster_json_file = a8::Format("%s/node%d/game%d.masterserver.cluster.json",
|
||||||
{
|
{
|
||||||
|
work_path_,
|
||||||
GAME_ID,
|
GAME_ID,
|
||||||
App::Instance()->node_id,
|
App::Instance()->node_id,
|
||||||
GAME_ID
|
GAME_ID
|
||||||
});
|
});
|
||||||
routing_tables_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/routing_tables.json",
|
routing_tables_json_file = a8::Format("%s/routing_tables.json",
|
||||||
{
|
{
|
||||||
GAME_ID
|
GAME_ID
|
||||||
});
|
});
|
||||||
#else
|
#else
|
||||||
wsproxyserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.wsproxy.cluster.json",
|
std::string targetserver_cluster_json_file;
|
||||||
{GAME_ID, GAME_ID});
|
wsproxyserver_cluster_json_file = a8::Format("%s/game%d.wsproxy.cluster.json",
|
||||||
masterserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.masterserver.cluster.json",
|
{
|
||||||
{GAME_ID, 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});
|
targetserver_cluster_json_file = a8::Format("%s/game%d.gameserver.cluster.json",
|
||||||
|
{
|
||||||
|
GAME_ID
|
||||||
|
});
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
wsproxyserver_cluster_json_.ReadFromFile(wsproxyserver_cluster_json_file);
|
wsproxyserver_cluster_json_.ReadFromFile(wsproxyserver_cluster_json_file);
|
||||||
#if MASTER_MODE
|
#if MASTER_MODE
|
||||||
masterserver_cluster_json_.ReadFromFile(masterserver_cluster_json_file);
|
masterserver_cluster_json_.ReadFromFile(masterserver_cluster_json_file);
|
||||||
|
@ -19,6 +19,7 @@ class JsonDataMgr : public a8::Singleton<JsonDataMgr>
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::string work_path_ = "../config";
|
||||||
a8::XObject wsproxyserver_cluster_json_;
|
a8::XObject wsproxyserver_cluster_json_;
|
||||||
a8::XObject masterserver_cluster_json_;
|
a8::XObject masterserver_cluster_json_;
|
||||||
#if MASTER_MODE
|
#if MASTER_MODE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user