pub fn spawn_job<F>(
pool: DbPool,
kind: &str,
actor: &str,
params: Value,
body: F,
) -> Result<Uuid, String>Expand description
Spawns a background job: inserts a queued row, returns its uuid, and runs body on a thread.
The body reports progress via JobProgress and returns a terminal result or an error message.