1
This commit is contained in:
parent
ebe690a5d8
commit
9ed869fd3f
@ -1,9 +1,16 @@
|
||||
project(dbproxy)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
if (${GAME_ID})
|
||||
message(GAME_ID: ${GAME_ID})
|
||||
else()
|
||||
set(GAME_ID 1008)
|
||||
message(GAME_ID: ${GAME_ID})
|
||||
endif()
|
||||
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++11 -fsanitize=address -fno-omit-frame-pointer")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID}")
|
||||
|
||||
include_directories(
|
||||
AFTER
|
||||
|
@ -18,6 +18,6 @@ enum NetHandler_e
|
||||
HID_DBPool,
|
||||
};
|
||||
|
||||
const char* const PROJ_NAME = "game1008_dbsproxy";
|
||||
const char* const PROJ_NAME = "game" A8_MACRO_STR(GAME_ID) "_dbproxy";
|
||||
const char* const PROJ_ROOT = "/data/logs/%s";
|
||||
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
loop_mutex_ = new std::mutex();
|
||||
loop_cond_ = new std::condition_variable();
|
||||
|
||||
gamedb_ = "gamedb1008_1";
|
||||
gamedb_ = a8::Format("gamedb%d_1", {GAME_ID});
|
||||
dbhost_ = "127.0.0.1";
|
||||
dbuser_ = "root";
|
||||
dbpasswd_ = "keji178";
|
||||
|
@ -7,9 +7,10 @@ void JsonDataMgr::Init()
|
||||
{
|
||||
std::string dbproxyserver_cluster_json_file;
|
||||
if (getenv("is_dev_env")) {
|
||||
dbproxyserver_cluster_json_file = "/var/data/conf_test/game1008/dbproxy/game1008.dbproxy.cluster.json";
|
||||
dbproxyserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/dbproxy/game%d.dbproxy.cluster.json",
|
||||
{GAME_ID, GAME_ID});
|
||||
} else {
|
||||
dbproxyserver_cluster_json_file = "../config/game1008.dbproxy.cluster.json";
|
||||
dbproxyserver_cluster_json_file = a8::Format("../config/game%d.dbproxy.cluster.json", {GAME_ID});
|
||||
}
|
||||
dbproxyserver_cluster_json_.ReadFromFile(dbproxyserver_cluster_json_file);
|
||||
}
|
||||
|
2
third_party/a8engine
vendored
2
third_party/a8engine
vendored
@ -1 +1 @@
|
||||
Subproject commit 3d34fc3fbe5e0491010b1224ca655909845f9d7d
|
||||
Subproject commit ab6f41321c5925b5a26f4a106f784551a172ecc9
|
Loading…
x
Reference in New Issue
Block a user