fix some error and add some fun

This commit is contained in:
lnk
2025-10-11 09:08:43 +08:00
parent 35231baae7
commit c494225b38
5 changed files with 106 additions and 27 deletions

View File

@@ -1156,7 +1156,7 @@ int recall_json_handle_from_mq(const std::string& body)
return 10004;
}
std::string guid = messageBody["guid"].get<std::string>();
send_reply_to_queue(guid, static_cast<int>(ResponseCode::OK), "收到补招指令");
//send_reply_to_queue(guid, static_cast<int>(ResponseCode::OK), "收到补招指令");
// 提取 data 数组
if (!messageBody.contains("data") || !messageBody["data"].is_array()) {
@@ -2233,14 +2233,14 @@ void execute_bash(string fun,int process_num,string type)
char p_num_str[20];
// 使用 sprintf 转换
std::sprintf(p_num_str, "%d", process_num);
const char* script = std::string(FRONT_PATH + "/bin/set_process.sh").c_str();//使用setsid防止端口占用
std::string script = FRONT_PATH + "/bin/set_process.sh";//使用setsid防止端口占用
const char* param1 = fun.c_str();
const char* param2 = p_num_str;
const char* param3 = type.c_str();
// 构造完整的命令
char command[256];
snprintf(command, sizeof(command), "%s %s %s %s &", script, param1, param2, param3);
snprintf(command, sizeof(command), "%s %s %s %s &", script.c_str(), param1, param2, param3);
std::cout << "command:" << command <<std::endl;