2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2025-01-11 20:15:49 +00:00

Drain joinset before completing migration

This commit is contained in:
asonix 2023-07-16 10:02:05 -05:00
parent 37e2012509
commit f9b8e817e6

View file

@ -126,6 +126,10 @@ where
joinset.spawn_local(async move { migrate_hash(&state, hash).await });
}
while let Some(res) = joinset.join_next().await {
res.map_err(|_| UploadError::Canceled)??;
}
// clean up the migration table to avoid interfering with future migrations
repo.clear().await?;