Launchbay

State and housekeeping

Where Launchbay keeps its data, and how it cleans up after itself.

State lives in ~/.launchbay (LAUNCHBAY_HOME overrides): launchbay.db (SQLite), logs/<id>.log, blobs/<sha256> (listing images), and token, the bearer token for the HTTP API on 127.0.0.1:7717 (LAUNCHBAY_PORT).

When a job succeeds or fails, the daemon posts a macOS notification (project, job and what it ran), so a long build doesn't need the app open; launchbay daemon --no-notify turns that off.

Artifacts and logs are pruned when the daemon starts and every 6 hours after: a job that finished more than 30 days ago loses artifacts/<id>/ and logs/<id>.log, except the 3 newest successful builds of each project and platform, and any artifact a queued submit still names. The job itself stays in the list and the History tab. launchbay daemon --keep-days N --keep-builds N changes the policy (--keep-days 0 turns it off); launchbay prune [--days N] [--keep N] prunes now. The same pass deletes listing images in blobs/ that no snapshot uses any more, once they're a day old (an image just imported may still be waiting in an unsaved edit).

A job whose supervisor is gone too, with no recorded result (the Mac restarted mid-build, say), is marked failed when the daemon next starts.

Daemon restarts

Running jobs outlive the daemon, so restarting it (to install a new build, say: cargo install --path . && launchctl kickstart -k gui/$(id -u)/com.vincentvella.launchbay.daemon) doesn't cost a build. Each job runs under launchbay supervise, which records how it ended in ~/.launchbay/status/; the next daemon picks still-running jobs back up, and takes the result of any that finished while it was down from there.

On this page