// Context API: ctx.heartbeat(), ctx.progress(...), ctx.cancellation_requested(), ctx.saved_data().
// Dispatch from a transactional mutation: ctx.dispatch_job::<{{Name}}Job>(args).
use forge::prelude::*;
#[forge::job(retry(max_attempts = 5, base_delay = "1s"), timeout = "5m")]
pub async fn {{name}}(ctx: &JobContext, args: serde_json::Value) -> Result<()> {
ctx.heartbeat().await?;
// TODO: do work; call ctx.heartbeat().await? periodically for long jobs
let _ = args;
Ok(())
}