mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-06 02:48:25 +00:00
Restore start metadata when rehydrating rewound runs
This commit is contained in:
parent
d52b53a874
commit
fc329beb7c
1 changed files with 7 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ use fabro_workflow::operations::{
|
|||
find_run_id_by_prefix_or_store, rewind,
|
||||
};
|
||||
use fabro_workflow::records::CheckpointExt;
|
||||
use fabro_workflow::records::{RunRecord, RunRecordExt};
|
||||
use fabro_workflow::records::{RunRecord, RunRecordExt, StartRecord, StartRecordExt};
|
||||
use fabro_workflow::run_lookup::{resolve_run_combined, runs_base};
|
||||
use fabro_workflow::run_status::{self, RunStatus};
|
||||
use git2::Repository;
|
||||
|
|
@ -137,6 +137,12 @@ async fn reset_rewound_run_state(
|
|||
.put_run(&run_record)
|
||||
.await
|
||||
.map_err(|err| anyhow::anyhow!("failed to restore run record after rewind: {err}"))?;
|
||||
if let Ok(start_record) = StartRecord::load(run_dir) {
|
||||
run_store
|
||||
.put_start(&start_record)
|
||||
.await
|
||||
.map_err(|err| anyhow::anyhow!("failed to restore start record after rewind: {err}"))?;
|
||||
}
|
||||
if let Ok(dot_source) = std::fs::read_to_string(run_dir.join("workflow.fabro")) {
|
||||
run_store
|
||||
.put_graph(&dot_source)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue