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