Skip to content

Commit

Permalink
add docstring [Cand update the name of functions
Browse files Browse the repository at this point in the history
  • Loading branch information
yuunlimm committed Oct 31, 2024
1 parent 74b5cd0 commit e8f1894
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rust/sdk-processor/src/config/processor_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ impl ProcessorConfig {
}

/// Get the Vec of table names for parquet processors only.
///
/// This is a convenience method to map the table names to include the processor name as a prefix, which
/// is useful for querying the status from the processor status table in the database.
pub fn get_table_names(&self) -> Option<Vec<String>> {
Expand All @@ -65,7 +66,6 @@ impl ProcessorConfig {
// Get the processor name as a prefix
let prefix = self.name();
// Use the tables from the config and map them to include the prefix
println!("config.tables: {:?}", prefix);
Some(
config
.tables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ impl ProcessorTrait for ParquetDefaultProcessor {
},
}

// TODO: Starting version from config. 0 if not set.
// Determine the processing mode (backfill or regular)
let is_backfill = self.config.backfill_config.is_some();

Expand Down
8 changes: 6 additions & 2 deletions rust/sdk-processor/src/utils/starting_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ pub async fn get_starting_version(
))
}

pub async fn get_minimum_last_success_version(
/// Get the appropriate minimum last success version for the parquet processors.
///
/// This will return the minimum of the last success version of the processors in the list.
/// If no processor has a checkpoint, this will return the `starting_version` from the config, or 0 if not set.
pub async fn get_min_last_success_version_parquet(
indexer_processor_config: &IndexerProcessorConfig,
conn_pool: ArcDbPool,
processor_names: Vec<String>,
Expand All @@ -60,7 +64,7 @@ pub async fn get_minimum_last_success_version(
))
}

async fn get_processed_version_from_db(
async fn get_min_processed_version_from_db(
conn_pool: ArcDbPool,
processor_names: Vec<String>,
) -> Result<Option<u64>> {
Expand Down

0 comments on commit e8f1894

Please sign in to comment.