From 240bbd4be2c39c000782d2a2c42c83596f271268 Mon Sep 17 00:00:00 2001 From: Manuel Raimann Date: Fri, 11 Oct 2024 10:37:14 +0200 Subject: [PATCH] db-ingest: Add error log --- db-ingest/src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/db-ingest/src/main.rs b/db-ingest/src/main.rs index b19bef5..0d860ef 100644 --- a/db-ingest/src/main.rs +++ b/db-ingest/src/main.rs @@ -8,11 +8,11 @@ use crate::parsers::active_matches_json_lines_parser::ActiveMatchesJsonLinesPars use crate::parsers::metadata_content_parser::MetaDataContentParser; use crate::parsers::metadata_parser::MetaDataParser; use crate::parsers::parser::Parser; -use ::s3::request::ResponseData; use futures_lite::StreamExt; use lapin::message::Delivery; use lapin::options::{BasicAckOptions, BasicRejectOptions}; use log::{debug, error, info}; +use ::s3::request::ResponseData; use std::path::Path; use std::sync::Arc; use tokio::sync::Semaphore; @@ -86,6 +86,7 @@ async fn try_process_message(message: &Delivery) -> Result<(), ParseError> { match process_file(&file_data, &file_content).await { Ok(_) => Ok(()), Err(e) => { + error!("Error processing file: {:?}", e); let failed_path = get_failed_path( &file_data.file_name, file_data.file_type, @@ -164,7 +165,7 @@ async fn process_metadata( compressed, &get_parsed_path(&file_data.file_name, result.file_type, result.compression), ) - .await?; + .await?; let s3_path = file_data .file_path .to_str() @@ -193,7 +194,7 @@ async fn process_metadata_content( compressed, &get_parsed_path(&file_data.file_name, result.file_type, result.compression), ) - .await?; + .await?; let s3_path = file_data .file_path .to_str() @@ -221,7 +222,7 @@ async fn process_active_matches( compressed, &get_parsed_path(&file_data.file_name, result.file_type, result.compression), ) - .await?; + .await?; let s3_path = file_data .file_path .to_str()