From e8d33638b0a6e1dfae3076d609fc86de132796ba Mon Sep 17 00:00:00 2001 From: Viv Lim Date: Tue, 12 Jul 2022 02:30:18 -0700 Subject: [PATCH] reduce length of some error msgs --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 0b52ca6..a98bfb1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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; } }