reduce length of some error msgs

This commit is contained in:
Viv Lim 2022-07-12 02:30:18 -07:00
parent 83cf933755
commit e8d33638b0
1 changed files with 2 additions and 2 deletions

View File

@ -178,14 +178,14 @@ async fn download_task_inner(state: &State, load_id: usize, url: String) -> anyh
state.num_kibibytes_downloaded.fetch_add((bytes.len()/1024).try_into()?, Ordering::Relaxed);
},
Some(Err(e)) => {
log_send.send(format!("Task id {} errored while reading from {}: {}", load_id, &url, e)).await?;
log_send.send(format!("Task {} ({}) error: {}", load_id, &url, e)).await?;
// do this second just in case the await fails. if the await fails or we otherwise exit, we'll add this *outside*
state.num_tasks_errored.fetch_add(1, Ordering::SeqCst);
break;
},
None => {
state.num_tasks_errored.fetch_add(1, Ordering::SeqCst);
log_send.send(format!("Task id {} ran out of data from {}.", load_id, &url)).await?;
log_send.send(format!("Task {} ran out of data from {}.", load_id, &url)).await?;
break;
}
}