pub fn vacuum_handler(threshold_percent: f64) -> VacuumHandlerExpand description
Returns a cron handler that checks DB health and vacuums if needed.
The handler extracts Service<Database> from the cron context.
Register the Database in the service registry before building the
scheduler.
ยงExample
use modo::cron::Scheduler;
use modo::db;
use modo::service::Registry;
let mut registry = Registry::new();
// registry.add(db.clone());
let scheduler = Scheduler::builder(®istry)
.job("0 3 * * 0", db::vacuum_handler(20.0))?
.start()
.await;