subagent: keep runs at +1000 when their cgroup is unavailable
Without a run cgroup (no delegation, setup failed, or one create failed) a subagent run was started plain at oom_score_adj 0, below the +500 the unit gave it before. Every run of the daemon now goes through the entry wrapper; it sets +1000 and enters the cgroup only when there is one. run_cgroup::entry takes the cgroup as an Option.
This commit is contained in:
parent
b31db6c7d9
commit
afe6026d44
5 changed files with 159 additions and 64 deletions
|
|
@ -65,7 +65,7 @@ async fn serve() -> Result<()> {
|
|||
.on_runtime(runtime)
|
||||
.publishing_to(hive_subagent_mcp::swarm_term::Publisher::spawn())
|
||||
.reading_models_from(hive_subagent_mcp::swarm_models::Reader::spawn())
|
||||
.in_run_cgroups(hive_agent_sock::run_cgroup::RunCgroups::init("runs")),
|
||||
.entering_runs(hive_agent_sock::run_cgroup::RunCgroups::init("runs")),
|
||||
);
|
||||
|
||||
// Serve the MCP tools over streamable-http forever. No background poll
|
||||
|
|
|
|||
Loading…
Reference in a new issue