batch_mode_process_response/
process_error_file.rs1crate::ix!();
3
4pub async fn process_error_file(
5 triple: &BatchFileTriple,
6 operations: &[BatchErrorFileProcessingOperation],
7) -> Result<(), BatchErrorProcessingError> {
8
9 let error_file = triple.error().as_ref().unwrap();
10
11 info!("processing batch error file {:?} with operations: {:#?}", error_file, operations);
12
13 let error_data = load_error_file(error_file).await?;
14
15 for operation in operations {
16 match operation {
17 BatchErrorFileProcessingOperation::LogErrors => {
18 triple.log_errors(&error_data).await?;
19 }
20 BatchErrorFileProcessingOperation::RetryFailedRequests => {
21 triple.retry_failed_requests(&error_data).await?;
22 }
23 }
25 }
26
27 Ok(())
28}