update server config

This commit is contained in:
linbo 2026-06-17 14:57:39 +08:00
parent f6817c7b1c
commit 3edbd1dc34
2 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include "service/grpc/include/server_runner.h" #include "service/grpc/include/server_runner.h"
#include "utils/base/include/logger.h" #include "utils/base/include/logger.h"
#include "common/utils/config_helper/include/config_helper.h"
using namespace cmvr::service; using namespace cmvr::service;
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
std::string config_path; std::string config_path;

View File

@ -23,6 +23,7 @@
#include "json/json.h" #include "json/json.h"
#include <grpcpp/ext/proto_server_reflection_plugin.h> #include <grpcpp/ext/proto_server_reflection_plugin.h>
#include "service/grpc/include/grpc_agv_service.h" #include "service/grpc/include/grpc_agv_service.h"
#include "common/utils/config_helper/include/config_helper.h"
using namespace cmvr::service; using namespace cmvr::service;
ServerRunner::ServerRunner() = default; ServerRunner::ServerRunner() = default;
@ -108,6 +109,7 @@ void ServerRunner::threadMain() {
auto dmgr_cfg = cfg_.getChild("DeviceManager"); auto dmgr_cfg = cfg_.getChild("DeviceManager");
DeviceManager::getInstance(dmgr_cfg); DeviceManager::getInstance(dmgr_cfg);
cmvr::ConfigHelper::getServerConfig(servercfg_);
std::string port = servercfg_.grpc_server().port(); std::string port = servercfg_.grpc_server().port();
std::string local_address = "0.0.0.0:" + port; std::string local_address = "0.0.0.0:" + port;