refactor: 移除 ReloadEvent::PointCreate,统一使用 PointCreateBatch

This commit is contained in:
caoqianming 2026-03-05 09:31:52 +08:00
parent a6be0827d0
commit 114d350e5b
1 changed files with 0 additions and 27 deletions

View File

@ -12,10 +12,6 @@ pub enum ReloadEvent {
SourceDelete { SourceDelete {
source_id: Uuid, source_id: Uuid,
}, },
PointCreate {
source_id: Uuid,
point_id: Uuid,
},
PointCreateBatch { PointCreateBatch {
source_id: Uuid, source_id: Uuid,
point_ids: Vec<Uuid>, point_ids: Vec<Uuid>,
@ -58,29 +54,6 @@ impl EventManager {
tracing::error!("Failed to disconnect from source {}: {}", source_id, e); tracing::error!("Failed to disconnect from source {}: {}", source_id, e);
} }
} }
ReloadEvent::PointCreate { source_id, point_id } => {
match connection_manager
.subscribe_points_from_source(source_id, Some(vec![point_id]), &pool)
.await
{
Ok(stats) => {
let subscribed = *stats.get("subscribed").unwrap_or(&0);
let polled = *stats.get("polled").unwrap_or(&0);
let total = *stats.get("total").unwrap_or(&0);
tracing::info!(
"PointCreate subscribe finished for source {} point {}: subscribed={}, polled={}, total={}",
source_id,
point_id,
subscribed,
polled,
total
);
}
Err(e) => {
tracing::error!("Failed to subscribe to point {}: {}", point_id, e);
}
}
}
ReloadEvent::PointCreateBatch { source_id, point_ids } => { ReloadEvent::PointCreateBatch { source_id, point_ids } => {
let requested_count = point_ids.len(); let requested_count = point_ids.len();
match connection_manager match connection_manager