> laravel-background-processing

Scalable asynchronous workflows using Queues, Jobs, and Events. Use when implementing queued jobs, event-driven workflows, or async processing in Laravel. (triggers: app/Jobs/**/*.php, app/Events/**/*.php, app/Listeners/**/*.php, ShouldQueue, dispatch, batch, chain, listener)

fetch
$curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/laravel-background-processing?format=md"
SKILL.mdlaravel-background-processing

Laravel Background Processing

Priority: P1 (HIGH)

Structure

app/
├── Jobs/               # Asynchronous tasks
├── Events/             # Communication flags
└── Listeners/          # Task reactions

Implementation Guidelines

  • Offload Heavy Tasks: Move any logic taking >100ms to a Queued Job.
  • ShouldQueue Interface: Add to Listeners for transparent async execution.
  • Redis Driver: Use Redis for reliable and high-throughput queuing.
  • Job Chaining: Use Bus::chain() for dependent sequential jobs.
  • Job Batching: Use Bus::batch() for parallel task monitoring.
  • Failures: Define failed() method in jobs to handle permanent errors.
  • Monitoring: Use Laravel Horizon for real-time queue observability.

Anti-Patterns

  • Blocking UX: No heavy logic in Request path: Always defer to Queues.
  • Raw Models: No large job payloads: Pass model IDs, not full objects.
  • Implicit Flow: No deep event-loop logic: Keep listener chains shallow.
  • Silent Failures: No unmonitored queues: Ensure retries and alerts.

References

┌ stats

installs/wk0
░░░░░░░░░░
github stars341
██████████
first seenMar 17, 2026
└────────────

┌ repo

HoangNguyen0403/agent-skills-standard
by HoangNguyen0403
└────────────

┌ tags

└────────────