Queues and Horizon
Queues on the Laravel tab shows the app’s queues. With Laravel Horizon installed it opens Horizon’s dashboard instead.
▲ laraport › Production › shop-app-1 › Horizon ● ssh shop.example.com 1 Dashboard 2 Pending 44 3 Completed 10920 4 Failed 3 5 Silenced 6 Metrics ● live · updated 12:45:59 Jobs per minute Jobs past hour Failed past 7 days Status 184 10920 3 ● Active Total processes Max wait time Max runtime Max throughput 12 4s (emails) payments emails Current workload queue jobs processes wait default 3 4 1s emails 41 6 4s payments 0 2 0s Supervisors supervisor status queues processes balancing shop-horizon-1:supervisor-1 running default,emails 10 auto shop-horizon-1:supervisor-payments running payments 2 simple LARAPORT Production shop-app-1 tab/1-6 tabs p pause T terminate (restart) esc back ? help
Horizon dashboard
Section titled “Horizon dashboard”The dashboard updates live every 3 seconds.
| Tab | Shows |
|---|---|
| Dashboard | Jobs per minute, jobs and failed jobs over Horizon’s periods, status, processes, the longest wait and the busiest queues; the current workload per queue and the supervisors |
| Pending | Jobs waiting, and those being processed, shown as running |
| Completed | Finished jobs with their runtime |
| Failed | Failed jobs with the first line of the exception |
| Silenced | Jobs Horizon was told to silence |
| Metrics | Throughput and runtime per queue and job, from the last horizon:snapshot |
Lists show the 50 newest jobs with tags and times. enter opens a job: payload, full exception, context, tags and attempts.
| Key | Where | Action |
|---|---|---|
r |
Failed | Retry the job |
D |
Failed | Forget it (horizon:forget) |
A |
Failed | Retry all |
F |
Failed | Forget all |
C |
Pending | Clear the selected job’s queue |
p |
Dashboard | Pause or continue Horizon |
T |
Dashboard | Terminate Horizon, so your process manager restarts it with the current code |
ctrl+r |
Restart live updates |
Everything that changes something asks first, except retrying one job and continuing Horizon.
laraport reads Horizon through Horizon’s own classes inside the app, so it needs no access to Redis. One PHP process boots the app once and sends an update every 3 seconds; job lists are sent only when they change. The process ends by itself after 30 minutes and the screen starts a new one.
Without Horizon
Section titled “Without Horizon”The Queues screen shows the default connection, how many jobs wait in each queue, and the failed jobs, newest first, up to 500, with the job class and the first line of the exception.
| Key | Action |
|---|---|
enter |
The full exception |
r |
Retry the job |
D |
Forget it |
A |
Retry all |
F |
Flush all failed jobs |
These run as artisan queue:* commands; the last three ask first. Everything is read inside the app, so any driver works: Redis, database, SQS.