feat(queue): link rebuild queue entries to build log rows for live streaming
This commit is contained in:
parent
d31a723daf
commit
7118c5efdd
6 changed files with 101 additions and 9 deletions
|
|
@ -84,9 +84,19 @@ pub async fn rebuild_agent(
|
|||
// lifecycle_action; this catches the auto-update scan + any
|
||||
// other direct caller.
|
||||
let guard = coord.transient_guard(name, crate::coordinator::TransientKind::Rebuilding);
|
||||
let result = lifecycle::rebuild(name, &hive, &paths, &|step| {
|
||||
coord.set_queue_step(queue_entry_id, step)
|
||||
})
|
||||
let result = lifecycle::rebuild(
|
||||
name,
|
||||
&hive,
|
||||
&paths,
|
||||
&|step| coord.set_queue_step(queue_entry_id, step),
|
||||
&|log_id| {
|
||||
if let Some(qid) = queue_entry_id {
|
||||
if coord.rebuild_queue.set_build_log_id(qid, log_id) {
|
||||
coord.emit_rebuild_queue_snapshot();
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
.await;
|
||||
drop(guard);
|
||||
match &result {
|
||||
|
|
|
|||
Loading…
Reference in a new issue