do not start progress at 0 before diff complete (#1999)

* do not start progress at 0 before diff complete

* fix: Test rsync

* don't report progress of 0

* drop initialization value from progress stream

Co-authored-by: BluJ <mogulslayer@gmail.com>
This commit is contained in:
Aiden McClelland
2022-11-29 19:13:32 -07:00
committed by GitHub
parent 71d1418559
commit aafcce871e
4 changed files with 80 additions and 14 deletions

View File

@@ -463,7 +463,8 @@ async fn migrate(
ignore_existing: false,
exclude: Vec::new(),
},
)?;
)
.await?;
let mut package_data_transfer = Rsync::new(
"/media/embassy/migrate/package-data/",
"/embassy-data/package-data/",
@@ -473,7 +474,8 @@ async fn migrate(
ignore_existing: false,
exclude: vec!["tmp".to_owned()],
},
)?;
)
.await?;
let mut main_prog = 0.0;
let mut main_complete = false;

View File

@@ -200,7 +200,8 @@ async fn do_update(ctx: RpcContext, eos_url: EosUrl) -> Result<(), Error> {
eos_url.rsync_path()?,
"/media/embassy/next",
Default::default(),
)?;
)
.await?;
while let Some(progress) = rsync.progress.next().await {
crate::db::DatabaseModel::new()
.server_info()
@@ -305,7 +306,8 @@ async fn sync_boot() -> Result<(), Error> {
ignore_existing: true,
exclude: Vec::new(),
},
)?
)
.await?
.wait()
.await?;
if !*IS_RASPBERRY_PI {