Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Register handlers and run a capacity-aware worker with graceful shutdown.
let mut registry = headgate::Registry::new(); registry.register::<GenerateInvoice, _, _>(|ctx, task| async move { ctx.log(format!("generating {}", task.invoice_id)); Ok(()) })?; let (worker, handle) = headgate::Worker::new( store, registry, headgate::WorkerConfig { queues: vec!["billing".into()], capacity: 16, ..Default::default() }, ); worker.run().await?;
Was this page helpful?