forked from DGNum/colmena
nix: Fix deployment parallelization
This commit is contained in:
parent
5b2d8d75e7
commit
2bba64a002
4 changed files with 48 additions and 1 deletions
|
@ -226,11 +226,16 @@ impl Deployment {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
let mut futures = Vec::new();
|
||||
|
||||
for (name, profile) in profiles.iter() {
|
||||
let target = chunk.remove(name).unwrap();
|
||||
self.clone().deploy_node(parent.clone(), target, profile.clone()).await?;
|
||||
futures.push(self.clone().deploy_node(parent.clone(), target, profile.clone()));
|
||||
}
|
||||
|
||||
let result: NixResult<Vec<()>> = join_all(futures).await.into_iter().collect();
|
||||
result?;
|
||||
|
||||
// Create GC root
|
||||
if self.options.create_gc_roots {
|
||||
let job = parent.create_job(JobType::CreateGcRoots, nodes.clone())?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue