Expand description
Which runners to start and stop, as a pure function of queued jobs, slots and the memory budget (plan), and
the loop that applies those decisions with GitHub and Docker (engine). plan does no I/O and reads no clock.
Modules§
- engine
- The scheduling loop: polls GitHub, pulls the profiles’ images, applies
plan’s decisions with GitHub and Docker, removes each runner’s container when its job ends, keeps the mirror up while any runner runs, reseeds idle profiles and recovers runners and containers a previous daemon left. It also feeds the job history: queued jobs, the job each runner took (fromobserve::capture), steps from GitHub, mirror bytes, cache sizes and slot and budget changes. It owns slot state; it never serves the API (it publishesapi::Statusand takes commands throughControl) and never logs the token or a JIT config.
Structs§
- Profile
- A profile’s slots: one concurrent job each.
- Repository
- A repository as the planner sees it.
- Runner
Slot - A slot whose container runs a runner registered for one job.
- SlotRef
- Where slots are, by profile name and slot index (0 is slot 1).
Enums§
Constants§
- IDLE_
TIMEOUT - How long a started runner may wait for a job before it counts as surplus: covers the container’s start and GitHub’s assignment.