|
|
|
@ -15,6 +15,7 @@ use governor::{Quota, RateLimiter};
|
|
|
|
|
use reqwest::header::AUTHORIZATION; // ACCEPT, CONTENT_TYPE};
|
|
|
|
|
use serde::Deserialize; |
|
|
|
|
use tokio::io::AsyncBufReadExt; |
|
|
|
|
use tokio::time::timeout; |
|
|
|
|
use tracing::{debug, error, info, warn}; |
|
|
|
|
use tracing_subscriber::filter::EnvFilter; |
|
|
|
|
|
|
|
|
@ -683,9 +684,9 @@ async fn download_versions(
|
|
|
|
|
req |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
let resp = req.send().await?; |
|
|
|
|
let resp = timeout(Duration::from_secs(10), req.send()).await??; |
|
|
|
|
let status = resp.status(); |
|
|
|
|
let body = resp.bytes().await?; |
|
|
|
|
let body = timeout(Duration::from_secs(10), resp.bytes()).await??; |
|
|
|
|
|
|
|
|
|
if !status.is_success() { |
|
|
|
|
error!(status = ?status, "download failed"); |
|
|
|
|