deployment: Pass job to host during upload_keys

This commit is contained in:
Zhaofeng Li 2022-10-29 13:42:36 -06:00
parent 2efa8d26c1
commit 715e10561b

View file

@ -434,12 +434,13 @@ impl Deployment {
) -> ColmenaResult<()> {
let nodes = vec![target.name.clone()];
let job = parent.create_job(JobType::UploadKeys, nodes)?;
job.run(|_| async move {
job.run(|job| async move {
if target.host.is_none() {
return Err(ColmenaError::Unsupported);
}
let host = target.host.as_mut().unwrap();
host.set_job(Some(job));
host.upload_keys(&target.config.keys, true).await?;
Ok(())