Skip to main content

Module old_versions_service

Module old_versions_service 

Source
Expand description

Runs the old-version cleanup (old_versions.rs) once a day.

Every srv looks at its own channel’s version folders and logs what it found. It removes them by default; a host whose settings say oldversions:clean: false only gets the plan as the report (the log line, and GET /agentmux/old-versions). Like the build-cache cleanup it runs only in an srv started by its launcher on the real home, never in a dev, headless or test instance. A pass removes nothing unless this version carried the previous one’s data forward, so a start that lost its data keeps every older folder. A hosted workspace’s srv runs it two minutes after start rather than twenty; the same rules apply.

Functions§

install
Starts the schedule. Safe to call once at boot.
policy
The policy the settings ask for. hosted: this srv serves a hosted workspace (the one host that vouches for the person’s window is registered at boot), which removes by default.