This commit is contained in:
aozhiwei 2023-10-02 11:52:24 +08:00
parent 412b1a7731
commit 3fce35d421
2 changed files with 10 additions and 3 deletions

View File

@ -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(),
});

View File

@ -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_;
};