修复编译警告:将 PollPointInfo 改为公开,移除未使用的字段
This commit is contained in:
parent
475ac02322
commit
6f62d753a5
|
|
@ -59,10 +59,8 @@ struct PointWriteTarget {
|
||||||
external_id: String,
|
external_id: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct PollPointInfo {
|
pub struct PollPointInfo {
|
||||||
handle: JoinHandle<()>,
|
handle: JoinHandle<()>,
|
||||||
external_id: String,
|
|
||||||
interval_s: i32,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||||
|
|
@ -325,11 +323,7 @@ impl ConnectionManager {
|
||||||
if let Some(conn_status) = status.get_mut(&source_id) {
|
if let Some(conn_status) = status.get_mut(&source_id) {
|
||||||
conn_status.poll_points.insert(
|
conn_status.poll_points.insert(
|
||||||
point_id,
|
point_id,
|
||||||
PollPointInfo {
|
PollPointInfo { handle },
|
||||||
handle,
|
|
||||||
external_id: point.external_id.clone(),
|
|
||||||
interval_s: point.scan_interval_s,
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -670,7 +664,7 @@ impl ConnectionManager {
|
||||||
let source_connected = self
|
let source_connected = self
|
||||||
.get_status(*source_id)
|
.get_status(*source_id)
|
||||||
.await
|
.await
|
||||||
.map(|s| s.is_connected && s.session.is_some())
|
.map(|s| s.is_connected)
|
||||||
.unwrap_or(false);
|
.unwrap_or(false);
|
||||||
if !source_connected {
|
if !source_connected {
|
||||||
return Ok(Self::write_value_batch_result(
|
return Ok(Self::write_value_batch_result(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue