huskies: merge 1086 story Pipeline+Status split — Step C: migrate auto-assign, subscribers, and lifecycle transitions to read Pipeline + Status
This commit is contained in:
+11
-9
@@ -12,7 +12,7 @@
|
||||
//! zombie entries left over from sessions that predate the subscriber.
|
||||
|
||||
use crate::db::{ContentKey, all_content_ids, delete_content};
|
||||
use crate::pipeline_state::Stage;
|
||||
use crate::pipeline_state::{Pipeline, Stage, Status};
|
||||
use crate::slog;
|
||||
use crate::slog_warn;
|
||||
|
||||
@@ -111,16 +111,18 @@ pub(crate) fn sweep_zombie_content_on_startup() {
|
||||
}
|
||||
}
|
||||
|
||||
/// Return `true` when `stage` is one of the five terminal pipeline stages.
|
||||
/// Return `true` when `stage` is one of the terminal pipeline classifications.
|
||||
///
|
||||
/// Story 1086: matches via the [`Status`] projection (Done / Abandoned /
|
||||
/// Superseded / Rejected) plus [`Pipeline::Archived`] for plain archived items
|
||||
/// (which carry `Status::Active`). Future Stage variants automatically
|
||||
/// participate by returning the appropriate Status / Pipeline from
|
||||
/// [`Stage::status`] / [`Stage::pipeline`].
|
||||
fn is_terminal_stage(stage: &Stage) -> bool {
|
||||
matches!(
|
||||
stage,
|
||||
Stage::Done { .. }
|
||||
| Stage::Archived { .. }
|
||||
| Stage::Abandoned { .. }
|
||||
| Stage::Superseded { .. }
|
||||
| Stage::Rejected { .. }
|
||||
)
|
||||
stage.status(),
|
||||
Status::Done | Status::Abandoned | Status::Superseded | Status::Rejected
|
||||
) || matches!(stage.pipeline(), Pipeline::Archived)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user