fix: flush desc files explicitely
parent
97e42588ed
commit
cc8848d3ae
|
@ -84,16 +84,16 @@ impl RepoMgr {
|
|||
let lock = lock.unwrap();
|
||||
let _guard = lock.lock().await;
|
||||
|
||||
let mut archs = db::Package::find()
|
||||
let archs: Vec<String> = db::Package::find()
|
||||
.filter(db::package::Column::RepoId.eq(repo))
|
||||
.select_only()
|
||||
.column(db::package::Column::Arch)
|
||||
.distinct()
|
||||
.into_tuple::<String>()
|
||||
.stream(&self.conn)
|
||||
.into_tuple()
|
||||
.all(&self.conn)
|
||||
.await?;
|
||||
|
||||
while let Some(arch) = archs.next().await.transpose()? {
|
||||
for arch in archs {
|
||||
self.generate_archives(repo, &arch).await?;
|
||||
}
|
||||
|
||||
|
|
|
@ -397,6 +397,8 @@ pub async fn write_desc<W: AsyncWrite + std::marker::Unpin>(
|
|||
write_attribute(writer, key, &items.join("\n")).await?;
|
||||
}
|
||||
|
||||
writer.flush().await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -417,5 +419,7 @@ pub async fn write_files<W: AsyncWrite + std::marker::Unpin>(
|
|||
.await?;
|
||||
}
|
||||
|
||||
writer.flush().await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue