pub async fn run(
setup: Standalone,
listening: impl FnOnce(Listening),
shutdown: Receiver<u32>,
) -> Result<(), AppError>Expand description
Runs standalone until asked to stop (shutdown counts the requests): its worker drains
first (a second request interrupts its tasks at once), then the master and the API stop,
so interrupted tasks are recorded; listening gets the addresses once bound. A failing
master ends it too, its worker’s tasks interrupted at once (nothing can record them).
§Errors
AppError if the data directory, the database or a port can’t be set up, the schema
isn’t up to date (without migrate), or the master fails.