Fix forge syncing not working

This commit is contained in:
Jai A
2023-04-05 12:02:00 -07:00
parent b9de2b4b58
commit aa84f21fde
7 changed files with 31 additions and 13 deletions

View File

@@ -93,7 +93,7 @@ pub async fn retrieve_data(
if !loaders.is_empty() {
version_futures.push(async {
let loaders_versions = Vec::new();
let mut loaders_versions = Vec::new();
{
let loaders_futures = loaders.into_iter().map(|(loader_version_full, version)| async {
@@ -464,8 +464,9 @@ pub async fn retrieve_data(
while versions.peek().is_some() {
let now = Instant::now();
let chunk: Vec<_> = versions.by_ref().take(1).collect();
futures::future::try_join_all(chunk).await?;
let chunk: Vec<_> = versions.by_ref().take(10).collect();
let res = futures::future::try_join_all(chunk).await?;
loaders_versions.extend(res.into_iter().flatten());
chunk_index += 1;
@@ -493,7 +494,7 @@ pub async fn retrieve_data(
while versions.peek().is_some() {
let now = Instant::now();
let chunk: Vec<_> = versions.by_ref().take(10).collect();
let chunk: Vec<_> = versions.by_ref().take(1).collect();
futures::future::try_join_all(chunk).await?;
chunk_index += 1;
@@ -544,6 +545,8 @@ pub async fn retrieve_data(
}
}
println!("{}", serde_json::to_string(&versions).unwrap());
upload_file_to_bucket(
format!(
"forge/v{}/manifest.json",