Skip to content

Commit 4ee43fa

Browse files
committed
feature: sync-qdrant add prints for totals
1 parent 8c7d0cb commit 4ee43fa

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

server/src/bin/sync-qdrant.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ async fn main() -> Result<(), ServiceError> {
3232
let web_pool = actix_web::web::Data::new(pool.clone());
3333

3434
let collections = get_qdrant_collections().await?;
35+
let mut total = 0;
3536

3637
for collection in collections {
3738
println!("starting on collection: {:?}", collection);
@@ -72,6 +73,8 @@ async fn main() -> Result<(), ServiceError> {
7273
.map(|(_, x)| *x)
7374
.collect::<Vec<uuid::Uuid>>();
7475

76+
total += qdrant_point_ids.len();
77+
7578
if !qdrant_point_ids_not_in_pg.is_empty() {
7679
println!(
7780
"len of qdrant_point_ids_not_in_pg: {:?}, {:?}",
@@ -80,6 +83,8 @@ async fn main() -> Result<(), ServiceError> {
8083
);
8184

8285
delete_points_from_qdrant(qdrant_point_ids_not_in_pg, collection.clone()).await?;
86+
} else {
87+
println!("Scrolled {}/{}", qdrant_point_ids.len(), total);
8388
}
8489

8590
offset = new_offset;

0 commit comments

Comments
 (0)