Skip to content
Back to skills

Queues And Workflows

ASecurity

Builds queued jobs, durable workflows, events, listeners, scheduled tasks, and concurrent background work in Laravel for Rust. Use when adding jobs, workflows, events, listeners, or scheduled tasks.

  • 8 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
developmentrustdatabase

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add danielhe4rt/overthinking-canvas-rs --skill queues-and-workflows --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Queues And Workflows?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Queues And Workflows
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/danielhe4rt-queues-and-workflows/badge)](https://www.skillsdirectory.com/skills/danielhe4rt-queues-and-workflows)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: queues-and-workflows
description: Builds queued jobs, durable workflows, events, listeners, scheduled tasks, and concurrent background work in Laravel for Rust. Use when adding jobs, workflows, events, listeners, or scheduled tasks.
---

# Queues, Workflows, Events & Scheduling

Consult the installed framework docs (locate via `.agents/skills/writing-laravel-rust-apps/scripts/docs-path.sh`) for full details: `queues.md`, `workflows.md`, `events.md`, `scheduling.md`, and `tasks.md`.

## Choosing the Right Primitive

- Use a queued job (`src/jobs/`) for work that should run off the request thread with retries and durability (sending webhooks, processing uploads, generating exports).
- Use a workflow (`src/workflows/`) for long-running multi-step processes that span hours or days, sleep between steps, or pause waiting for external callbacks/webhooks.
- Use events (`src/events/`) and `#[listener]` functions (`src/listeners/`) to decouple side effects from a primary action (e.g., `OrderPlaced` triggering receipt email and audit logging).
- Use `laravel::task` (`tasks.md`) for lightweight in-process concurrency that does not need crash durability or retries.

## Critical Footguns & Conventions

- Laravel discovers `#[job]`, `#[workflow]`, `#[listener]`, `#[command]`, and `#[schedule]` automatically across your crate, **only** in modules that Rust compiles. Always declare new modules in `src/lib.rs` and submodules in `mod.rs`—if you forget a `mod` line, Rust skips the file without a warning and nothing in it runs.
- Store owned values or IDs (never borrowed references) in job, workflow, and event structs. Derive `Queueable` on jobs and workflows, and `Event` on events.
- When using database-backed queues or workflows, add migrations using `laravel::queue::tables!()` or `laravel::workflow::tables!()` (new applications do not include workflow tables by default).
- In workflows, keep `handle` deterministic across replays: wrap every side effect or non-deterministic read inside `run.step("name", ...)` and suspend with `run.sleep(...)` or waits—never block a worker thread with `tokio::time::sleep`.
- Keep scheduled callbacks in `src/console/mod.rs` thin: dispatch a job or call an action function so the underlying logic can be tested directly without running `schedule:run`.
- Remember that tests route all jobs to the `sync` connection by default unless faked with `let queue = queue::fake();`.

```rust
// src/jobs/process_podcast.rs
use laravel::queue::{Queueable, job};

use crate::models::Podcast;

#[derive(Queueable)]
pub struct ProcessPodcast {
    pub podcast_id: i64,
}

#[job]
impl ProcessPodcast {
    pub async fn handle(self) -> laravel::Result<()> {
        let podcast = Podcast::find_or_fail(self.podcast_id).await?;

        // Process the podcast...
        let _ = podcast;

        Ok(())
    }
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.