[−][src]Function hm::get_task_batches
pub fn get_task_batches(
nodes: HashMap<String, ManagedObject>
) -> Result<Vec<Vec<ManagedObject>>, HMError>
Create a non-cyclical dependency graph and give it back as a Vec<Vec<ManagedObject>>. Will return a CyclicalDependencyError if the graph is unsolveable. Intended to be used with either mgmt::execute_solution or mgmt::send_tasks_off_to_college.
Example:
let (rx, tx) = mpsc::channel(); let p = ProgressBar::new_spinner(); let v: Vec<Vec<ManagedObject>> = get_task_batches(nodes); for a in v { for b in a { mgmt::send_tasks_off_to_college(&b, &tx, p); } }