Skip to content

Queue Driver Configuration Analyzer

Analyzer IDCategorySeverityTime To Fix
queue-driver⚡ PerformanceMedium30 minutes

What This Checks

Ensures Laravel's queue driver is configured for reliability and performance - Redis or SQS for production, avoiding sync driver that blocks requests.

Why It Matters

  • Performance: Sync driver blocks requests until jobs complete
  • Reliability: Null driver silently discards jobs
  • Scalability: Proper drivers enable horizontal scaling

The sync driver processes jobs immediately in the same request, blocking the user. The null driver discards jobs entirely. Both are unsuitable for production.

How to Fix

Quick Fix (5 minutes)

ini
# .env
QUEUE_CONNECTION=redis

Proper Fix (30 minutes)

Redis:

bash
sudo apt-get install redis-server
composer require predis/predis

AWS SQS:

bash
composer require aws/aws-sdk-php
ini
QUEUE_CONNECTION=sqs
AWS_ACCESS_KEY_ID=your-key
AWS_SECRET_ACCESS_KEY=your-secret
AWS_DEFAULT_REGION=us-east-1
SQS_QUEUE=your-queue-url

Start Workers:

bash
php artisan queue:work redis --tries=3

ShieldCI Configuration

This analyzer is automatically skipped in CI environments ($runInCI = false).

Why skip in CI?

  • Queue backends (Redis, SQS) are typically unavailable in CI pipelines
  • CI environments commonly use the sync or database driver for simplicity, which would trigger false warnings
  • Driver choice is a deployment concern, not a code-correctness concern that CI should gate on

Testing environment note: When APP_ENV=testing, the database driver warning is also suppressed at the check level — testing is treated the same as local for this driver.

When to run this analyzer:

  • Local development: Ensures your queue driver is set up for realistic job processing
  • Staging/Production servers: Confirms a production-grade driver (Redis, SQS) is configured
  • CI/CD pipelines: Skipped automatically (queue backends typically unavailable)

References