Skip to main content

trim_shared

Function trim_shared 

Source
pub async fn trim_shared(
    docker: &impl DockerApi,
    names: &Names,
    caches: &Caches,
    mirror: Mirror,
    slots: &BTreeMap<String, usize>,
) -> Result<Trimmed, Error>
Expand description

Empties the shared caches that outgrew their limit, the mirror’s storage among them once the mirror is down (Mirror::Down), and removes the volumes of slots past the count slots gives their profile, as a lowered count leaves them: each holds a slot’s layers and Docker store, which no job prunes again (docs/adr/0054). Call only while no runner runs, and leave out of slots a profile whose reseed runs, which mounts its slots’ volumes.