refactor: 移除 ReloadEvent::PointCreate,统一使用 PointCreateBatch
This commit is contained in:
parent
a6be0827d0
commit
114d350e5b
27
src/event.rs
27
src/event.rs
|
|
@ -12,10 +12,6 @@ pub enum ReloadEvent {
|
|||
SourceDelete {
|
||||
source_id: Uuid,
|
||||
},
|
||||
PointCreate {
|
||||
source_id: Uuid,
|
||||
point_id: Uuid,
|
||||
},
|
||||
PointCreateBatch {
|
||||
source_id: Uuid,
|
||||
point_ids: Vec<Uuid>,
|
||||
|
|
@ -58,29 +54,6 @@ impl EventManager {
|
|||
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 } => {
|
||||
let requested_count = point_ids.len();
|
||||
match connection_manager
|
||||
|
|
|
|||
Loading…
Reference in New Issue