headless_lms_chatbot::azure_search_indexer

Function check_search_indexer_status

Source
pub async fn check_search_indexer_status(
    indexer_name: &str,
    app_config: &ApplicationConfiguration,
) -> Result<bool>
Expand description

Checks if the search indexer exists, is not running, and the last execution is not in progress. Also prints any errors and warnings from the last execution in a nicely formatted manner.

§Arguments

  • indexer_name - The name of the indexer to check.
  • app_config - The application configuration containing Azure settings.

§Returns

  • Ok(true) if the indexer exists, is not running, and the last execution is not in progress.
  • Ok(false) if the indexer is running or the last execution is in progress.
  • An error if the indexer does not exist or if there’s an issue fetching its status.