add reply in recall and +5 sec in recall and fix utc time in recall
This commit is contained in:
@@ -6926,6 +6926,34 @@ void send_reply_to_kafka(const std::string& guid, const std::string& step, const
|
||||
kafka_data_list_mutex.unlock();
|
||||
}
|
||||
|
||||
void send_reply_to_kafka_recall(const std::string& guid, const std::string& step, const std::string& result,const std::string& lineIndex,const std::string& recallStartDate,const std::string& recallEndDate){
|
||||
// 构造 JSON 字符串
|
||||
std::ostringstream oss;
|
||||
oss << "{"
|
||||
<< "\"guid\":\"" << guid << "\","
|
||||
<< "\"step\":\"" << step << "\","
|
||||
<< "\"result\":\"" << result << "\","
|
||||
<< "\"lineIndex\":\"" << lineIndex << "\","
|
||||
<< "\"recallStartDate\":\"" << recallStartDate << "\","
|
||||
<< "\"recallEndDate\":\"" << recallEndDate << "\","
|
||||
<< "\"processNo\":\"" << g_front_seg_index << "\","
|
||||
<< "\"frontType\":\"" << get_front_type_from_subdir() << "\","
|
||||
<< "\"nodeId\":\"" << FRONT_INST << "\""
|
||||
<< "}";
|
||||
|
||||
std::string jsonString = oss.str();
|
||||
|
||||
// 封装 Kafka 消息
|
||||
Ckafka_data_t connect_info;
|
||||
connect_info.strTopic = QString::fromStdString(Topic_Reply_Topic);
|
||||
connect_info.strText = QString::fromStdString(jsonString);
|
||||
|
||||
// 加入发送队列(带互斥锁保护)
|
||||
kafka_data_list_mutex.lock();
|
||||
kafka_data_list.append(connect_info);
|
||||
kafka_data_list_mutex.unlock();
|
||||
}
|
||||
|
||||
void send_heartbeat_to_kafka(const std::string& status) {
|
||||
// 构造 JSON 字符串
|
||||
std::ostringstream oss;
|
||||
|
||||
Reference in New Issue
Block a user