Revert "fix: Downloading fallback + better logging in production"

This reverts commit 2d29f3a5c7.
This commit is contained in:
ev chang 2024-12-18 17:01:32 -05:00
parent b26f864b1b
commit ad7f906d0a
No known key found for this signature in database
3 changed files with 1 additions and 6 deletions

View file

@ -265,7 +265,6 @@ pub async fn download_libraries(
artifact: Some(ref artifact), ..
}) = lib.downloads {
if !artifact.url.is_empty() {
tracing::info!("fetching library '{}' from '{}'", &lib.name, &artifact.url);
let bytes = fetch(&artifact.url, Some(&artifact.sha1), &st.fetch_semaphore).await?;
write(&path, &bytes, &st.io_semaphore).await?;
tracing::trace!("fetched library {} to path {:?}", &lib.name, &path);
@ -273,7 +272,6 @@ pub async fn download_libraries(
}
}
tracing::info!("fetching #2 library '{}' from '{}'", &lib.name, &artifact.url);
let url = [lib.url.as_deref().unwrap_or("https://libraries.minecraft.net/"), &artifact_path].concat();
let bytes = fetch(&url, None, &st.fetch_semaphore).await?;
write(&path, &bytes, &st.io_semaphore).await?;

View file

@ -28,7 +28,7 @@ pub fn start_logger() -> Option<WorkerGuard> {
});
let subscriber = tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer().pretty())
.with(tracing_subscriber::fmt::layer())
.with(filter)
.with(tracing_error::ErrorLayer::default());
@ -59,7 +59,6 @@ pub fn start_logger() -> Option<WorkerGuard> {
let (non_blocking, guard) = tracing_appender::non_blocking(file_appender);
let subscriber = tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer().pretty())
.with(
tracing_subscriber::fmt::layer()
.with_writer(non_blocking)

View file

@ -106,8 +106,6 @@ pub async fn fetch_advanced(
match result {
Ok(x) => {
let x = x.error_for_status()?;
let bytes = if let Some((feed, total)) = &ingress {
let length = x.content_length();
if let Some(total_size) = length {