eis/eqpalg/eqpalg.cpp
Huamonarch 224c2c45c4 Remove irrelevant comments from eqpalg source files
Cleaned 66 files across all eqpalg subdirectories:
- Removed commented-out dead code
- Removed redundant Chinese inline comments that restate variable/function names
- Removed trailing ///< annotations on self-explanatory fields
- Removed namespace closing comments
- Preserved all file headers, Doxygen documentation, and logic explanations
- No code changes — only comment removal
2026-05-09 13:30:09 +08:00

56 lines
1.7 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <eqpalg/define/public.h>
#include <eqpalg/eqpalg.h>
#include <glob/GlobDefine.h>
#include <utility/IniProperty.h>
#include <memory>
#include <string>
#include "mix_cc/debug/pre_define.h"
using namespace baosight;
ProcessType glob_process_type;
MIX_CC_TEST_DEBUG_MODE
eqpalg::eqpalg() { logger_ = std::make_unique<LOG>("eqpalg"); }
eqpalg::~eqpalg() {
logger_->Info() << "eqpalg::~eqpalg()"
<< "Destruct" << endl;
}
int eqpalg::start() {
string ss0 = "rm -rf /users/dsc/shm/MapRuleStat_boost.mmap";
system(ss0.c_str());
logger_->Info() << "start eqpalg." << endl;
// 启动ConnectionMag这个一定不要去除否则内部很多邹师傅写的库都无法正常工作
con_mag_ = std::make_shared<ConnectionMag>();
con_mag_->dbLogin();
try {
auto module_name = name();
// 根据模块名称,设置全局变量线程类型
if (module_name == "eqpalg-mon") {
glob_process_type = ProcessType::kMon;
} else if (module_name == "eqpalg-cron") {
glob_process_type = ProcessType::kCron;
} else if (module_name == "eqpalg-task") {
glob_process_type = ProcessType::kTask;
} else {
glob_process_type = ProcessType::kNull;
}
eqpalg_server = new EqpAlgICEI();
this->add(string("baosight/") + name(), eqpalg_server);
} catch (::Ice::LocalException& e) {
logger_->Error() << "Can not add baosight/eqpalg, error: " << e.what()
<< ",location:" << BOOST_CURRENT_LOCATION << endl;
return (-1);
} catch (std::exception& e) {
logger_->Error() << e.what() << ",location:" << BOOST_CURRENT_LOCATION
<< endl;
}
return 0;
}
PACE_PLATFORM_SERVER_INSTALL(eqpalg, APPVERSION);