log host on indexing error

main
Charlotte Som 2024-11-27 07:32:41 +02:00
parent 3b774e65eb
commit b7279d27af
2 changed files with 4 additions and 4 deletions

View File

@ -455,8 +455,8 @@ pub fn index_servers(server: Arc<RelayServer>, hosts: &[String]) {
let host = host.to_string(); let host = host.to_string();
let server = Arc::clone(&server); let server = Arc::clone(&server);
tokio::task::spawn(async move { tokio::task::spawn(async move {
if let Err(e) = index_server(server, host).await { if let Err(e) = index_server(server, host.clone()).await {
tracing::warn!("encountered error subscribing to PDS: {e:?}"); tracing::warn!(%host, "encountered error subscribing to PDS: {e:?}");
} }
}); });
} }

View File

@ -29,8 +29,8 @@ pub async fn handle_request_crawl(
let hostname = input.data.hostname; let hostname = input.data.hostname;
tokio::task::spawn(async move { tokio::task::spawn(async move {
if let Err(e) = index_server(server, hostname).await { if let Err(e) = index_server(server, hostname.clone()).await {
tracing::warn!("encountered error subscribing to PDS: {e:?}"); tracing::warn!(host = %hostname, "encountered error subscribing to PDS: {e:?}");
} }
}); });