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
56 lines
1.7 KiB
C++
56 lines
1.7 KiB
C++
#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);
|