flow
Prefect flow that snapshots every pod's background cache database.
The cache holds the site's own patient reviews and notes, which no run can
recompute, and it is a single file that is easy to delete.
bitfount.cache.backup keeps recent whole-file snapshots beside it; this flow
is the scheduled trigger for them, on its own cron so that backups do not ride
on the metadata refresh sweep — indexing and durability are different jobs, and
a backup should not stop because the refresh was disabled or its flow changed.
It takes no parameters: it sweeps PODS_CACHE_ROOT and, for each pod whose
database has changed since its newest backup, writes one. A database nothing has
written to since its last backup is skipped, so a quiet tick costs a directory
scan. Retention and the enabled flag come from the shared cache-backup settings.
Served only by the desktop orchestrator (see
orchestrator.orchestrator.bitfount_orchestrator._serve_metadata_deployments).
A Docker run_pod serves no cron deployments, so there the cache is covered by
the on-open backup in open_background_cache alone.
Module
Functions
cache_backup_runtime
def cache_backup_runtime() ‑> int:Back up every pod cache that has changed since its newest backup.
Returns How many backups were written.