Skip to content

Commit

Permalink
autocommit
Browse files Browse the repository at this point in the history
  • Loading branch information
nbittich committed Aug 9, 2023
1 parent 6abc6fc commit eb55986
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/extract_xlsx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ fn convert_row_column_to_letter(mut row: Row, mut column: Column) -> String {
pub async fn index_xlsx_file(
file_search_index: FileSearchIndex,
path_to_xlsx: impl Into<PathBuf>,
) -> Result<(), Box<dyn Error>> {
) -> Result<(), Box<dyn Error + Send + Sync>> {
let path_to_xlsx = path_to_xlsx.into();
let mut workbook = open_workbook_auto(&path_to_xlsx).expect("Cannot open file");
let mut workbook = open_workbook_auto(&path_to_xlsx)?;
let sheets = workbook.sheet_names().to_owned();

let mut index_writer = file_search_index.index_writer.lock().await;
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async fn post_index(
.ok_or(StatusCode::INTERNAL_SERVER_ERROR)?
{
"xls" | "xlsx" if path.exists() => {
tokio::spawn(async move { extract_xlsx::index_xlsx_file(fsi, path) });
tokio::spawn(async move { extract_xlsx::index_xlsx_file(fsi, path).await });
Ok(StatusCode::ACCEPTED)
}
_ => {
Expand Down

0 comments on commit eb55986

Please sign in to comment.