From 715e10561b27a310f3c0b960c6356a95a24851f4 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sat, 29 Oct 2022 13:42:36 -0600 Subject: [PATCH] deployment: Pass job to host during upload_keys --- src/nix/deployment/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nix/deployment/mod.rs b/src/nix/deployment/mod.rs index c1563b7..0a92a2e 100644 --- a/src/nix/deployment/mod.rs +++ b/src/nix/deployment/mod.rs @@ -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(())