@@ -236,6 +236,7 @@ impl FlowDag {
|
||||
/// - it exists in the DAG
|
||||
/// - it is not already started or completed
|
||||
/// - it has no dependencies, or all dependencies are completed
|
||||
///
|
||||
/// If any job has failed, the entire flow is considered failed and an error is returned.
|
||||
pub fn ready_jobs(&self) -> DagResult<Vec<u32>> {
|
||||
if let Some(failed_job) = self.failed_job {
|
||||
@@ -333,7 +334,9 @@ impl FlowDag {
|
||||
}
|
||||
match self.failed_job {
|
||||
Some(existing) if existing == job => Ok(()),
|
||||
Some(existing) => Err(DagError::FlowFailed { failed_job: existing }),
|
||||
Some(existing) => Err(DagError::FlowFailed {
|
||||
failed_job: existing,
|
||||
}),
|
||||
None => {
|
||||
self.failed_job = Some(job);
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user