fix ledger update
This commit is contained in:
@@ -5119,11 +5119,17 @@ void enqueue_realtime_pq(const RealtagPqDate_float& realdata,
|
||||
std::lock_guard<std::mutex> lk(g_last_ts_mtx);
|
||||
auto it = g_last_ts_by_devid.find(devid);
|
||||
if (it != g_last_ts_by_devid.end() && it->second == data_time) {
|
||||
|
||||
std::cout << "[enqueue_realtime_pq] duplicate timestamp, devid="
|
||||
<< devid << " time=" << data_time << std::endl;
|
||||
// 同一设备与上次时间相同 → 丢弃本次
|
||||
return;
|
||||
}
|
||||
// 记录本次时间
|
||||
g_last_ts_by_devid[devid] = data_time;
|
||||
|
||||
std::cout << "[enqueue_realtime_pq] record timestamp, devid="
|
||||
<< devid << " time=" << data_time << std::endl;
|
||||
}
|
||||
|
||||
std::vector<DataArrayItem> arr;
|
||||
|
||||
Reference in New Issue
Block a user