Skip to main content

merge_background_tasks

Function merge_background_tasks 

Source
fn merge_background_tasks(
    nodes: Vec<DockNodeView>,
    background_tasks: Vec<BackgroundTask>,
    now_ms: i64,
) -> Vec<DockNodeView>
Expand description

Append a synthetic DockNodeView for every Running db_background_tasks row not already represented in nodes (by id — db_background_tasks.id mirrors the dock’s own node_id, see background_tasks.rs’s module doc comment). Pure, unit-testable like dock_node_views above. A task still present in nodes is left as-is — the live cache’s own status is more specific (carries tool_name, real stuck computation) than anything this synthesizes from the registry alone.