huskies: merge 671_refactor_migrate_pipeline_state_consumers_from_string_comparisons_to_typed_pipelinestage_enum
This commit is contained in:
@@ -247,7 +247,9 @@ pub fn write_item_with_content(story_id: &str, stage: &str, content: &str) {
|
||||
write_content(story_id, content);
|
||||
|
||||
// Primary: CRDT ops.
|
||||
let merged_at_ts = if stage == "5_done" {
|
||||
let merged_at_ts = if crate::pipeline_state::Stage::from_dir(stage)
|
||||
.is_some_and(|s| matches!(s, crate::pipeline_state::Stage::Done { .. }))
|
||||
{
|
||||
Some(chrono::Utc::now().timestamp() as f64)
|
||||
} else {
|
||||
None
|
||||
@@ -321,7 +323,9 @@ pub fn move_item_stage(
|
||||
.unwrap_or((None, None, None, None, None));
|
||||
|
||||
// CRDT stage transition.
|
||||
let merged_at_ts = if new_stage == "5_done" {
|
||||
let merged_at_ts = if crate::pipeline_state::Stage::from_dir(new_stage)
|
||||
.is_some_and(|s| matches!(s, crate::pipeline_state::Stage::Done { .. }))
|
||||
{
|
||||
Some(chrono::Utc::now().timestamp() as f64)
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user