fix some error and add some fun
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user