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 server = Arc::clone(&server);
tokio::task::spawn(async move {
if let Err(e) = index_server(server, host).await {
tracing::warn!("encountered error subscribing to PDS: {e:?}");
if let Err(e) = index_server(server, host.clone()).await {
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;
tokio::task::spawn(async move {
if let Err(e) = index_server(server, hostname).await {
tracing::warn!("encountered error subscribing to PDS: {e:?}");
if let Err(e) = index_server(server, hostname.clone()).await {
tracing::warn!(host = %hostname, "encountered error subscribing to PDS: {e:?}");
}
});