anvilforge-cli 0.3.6

Smith — Anvilforge's CLI (Artisan equivalent). Scaffolding, migrations, serve, queue:work, schedule:run, test.
1
2
3
4
5
6
7
8
9
10
11
use anyhow::Result;

pub fn work(queue: &str) -> Result<()> {
    let status = std::process::Command::new("cargo")
        .args(["run", "--quiet", "--", "queue:work", "--queue", queue])
        .status()?;
    if !status.success() {
        anyhow::bail!("queue worker exited with status {status}");
    }
    Ok(())
}