Skip to main content

Module job_executor

Module job_executor 

Source
Expand description

Agent-side job executor. See plan/V2_AGENT_SPEC.md §7.

Owns the dispatch table (Vec<DiscoveredBackend>) produced by crate::discovery and the outbound WSS channel. Receives Job payloads from the WSS read loop, looks up the backend that serves the requested model_id, spawns a tokio task that drives Backend::execute, and pumps emitted bytes back as job_chunk messages followed by either job_done or job_error.

Concurrency is bounded by limits.max_concurrent from agent.toml: any job that arrives once that many are in flight is rejected immediately with out_of_capacity. Active jobs are tracked in a map so job_cancel from the coordinator can abort the underlying task.

Structs§

JobExecutor