Custom Queues

Plenty of Craft projects run more than one queue — a dedicated import queue, a queue for heavy media processing, or a separate worker kept off the default queue so long jobs don’t block everything else. Queuebert surfaces all of them in a single bar.

Queues in Craft 6

Craft 6 runs on Laravel’s queue. A “custom queue” is a queue name, optionally on its own connection in config/queue.php. You dispatch jobs onto it and run a worker for it:

ImportProducts::dispatch($feed)->onQueue('imports');
php artisan queue:work --queue=default,imports

Two Kinds of Queue

Queuebert reads two sources and merges them into one bar:

  • Craft’s queues. Craft records progress for every job on the queues named in its trackedQueueNames setting (by default just default). These give the bar its headline: the running job’s description and progress.
  • Every other queue. Laravel’s drivers only report sizes for these, so they add running, waiting, scheduled and failed counts.

How Queuebert Finds Them

Your queueWhat to do
On the database driverNothing. Discover queues automatically (on by default) finds every queue name with jobs or failures.
On Redis, SQS or BeanstalkdAdd it under Additional queues: imports for the default connection, or redis:imports for a named one.
Needs descriptions and progressAdd the name to Craft’s trackedQueueNames. Queuebert then reports it as part of Craft’s queue.

Tracking a queue in Craft looks like this in config/craft/general.php:

->trackedQueueNames(['default', 'imports'])

Queues on sync, null, deferred, background and failover connections don’t hold jobs anywhere Queuebert can count, so they’re skipped.

Failed Jobs

Failures on Craft’s queues come from Craft’s own job records. Failures on every other queue come from Laravel’s failed-jobs store, counted per connection and queue.

When a Queue Can’t Be Read

If a watched queue’s connection fails (Redis is down, say), Queuebert skips it for that poll and logs a warning at most once every 10 minutes. The rest of the bar keeps working.

Read-Only, Always

Queuebert reports on your queues but never drives them. It doesn’t start workers, retry failures, or move jobs between queues — it only reflects the state your queues already hold.

More in Performance & Monitoring

Pairs well with Queuebert

Find out what's slow, what's broken and what's running before somebody emails you about it.