Skip to content

Commit

Permalink
cleanup: ignore soft deleted datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
densumesh committed Aug 22, 2024
1 parent f2a7a52 commit 6a18478
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/src/bin/word-worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use trieve_server::{
errors::ServiceError,
establish_connection, get_env,
operators::{
chunk_operator::get_check_html_from_ids_query,
chunk_operator::get_chunk_html_from_ids_query,
dataset_operator::add_words_to_dataset,
parse_operator::convert_html_to_text,
words_operator::{CreateBkTreeMessage, ProcessWordsFromDatasetMessage},
Expand Down Expand Up @@ -250,7 +250,7 @@ async fn process_chunks(
clickhouse_client: clickhouse::Client,
) -> Result<(), ServiceError> {
let mut word_count_map: HashMap<(uuid::Uuid, String), i32> = HashMap::new();
if let Some(chunks) = get_check_html_from_ids_query(
if let Some(chunks) = get_chunk_html_from_ids_query(
message
.chunks_to_process
.clone()
Expand Down
2 changes: 1 addition & 1 deletion server/src/operators/chunk_operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2364,7 +2364,7 @@ pub async fn get_pg_point_ids_from_qdrant_point_ids(
}

#[tracing::instrument(skip(pool))]
pub async fn get_check_html_from_ids_query(
pub async fn get_chunk_html_from_ids_query(
chunk_ids: Vec<uuid::Uuid>,
pool: web::Data<Pool>,
) -> Result<Option<Vec<(uuid::Uuid, String)>>, ServiceError> {
Expand Down
1 change: 1 addition & 0 deletions server/src/operators/dataset_operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ pub async fn get_all_dataset_ids(pool: web::Data<Pool>) -> Result<Vec<uuid::Uuid

let datasets = datasets_columns::datasets
.select(datasets_columns::id)
.filter(datasets_columns::deleted.eq(0))
.load::<uuid::Uuid>(&mut conn)
.await
.map_err(|_| ServiceError::NotFound("Could not find dataset".to_string()))?;
Expand Down

0 comments on commit 6a18478

Please sign in to comment.