1
This commit is contained in:
parent
412b1a7731
commit
3fce35d421
@ -5,14 +5,20 @@
|
||||
#include "jsondatamgr.h"
|
||||
#include "app.h"
|
||||
|
||||
static const char* WORK_PATH = "../config";
|
||||
|
||||
void JsonDataMgr::Init()
|
||||
{
|
||||
if (!f8::IsOnlineEnv()) {
|
||||
if (f8::IsTestEnv()) {
|
||||
work_path_ = "../test_config";
|
||||
} else {
|
||||
work_path_ = "../dev_config";
|
||||
}
|
||||
}
|
||||
|
||||
std::string masterserver_cluster_json_file = a8::Format
|
||||
("%s/zone%d/node%d/masterserver.cluster.json",
|
||||
{
|
||||
WORK_PATH,
|
||||
work_path_,
|
||||
f8::App::Instance()->GetZoneId(),
|
||||
f8::App::Instance()->GetNodeId(),
|
||||
});
|
||||
|
@ -13,5 +13,6 @@ class JsonDataMgr : public a8::Singleton<JsonDataMgr>
|
||||
std::shared_ptr<a8::XObject> GetConf();
|
||||
|
||||
private:
|
||||
std::string work_path_ = "../config";
|
||||
a8::XObject masterserver_cluster_json_;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user