# Horizon

Source: https://docs.externa.qiick.io/docs/horizon

Externa ships **Laravel Horizon** for Redis-backed queues (zip, duplicate, imports, webhooks). Use it when Redis is available; otherwise keep `QUEUE_CONNECTION=database` and `queue:listen` / `queue:work`.

> **Upstream**
> [Laravel Horizon 13.x](https://laravel.com/docs/13.x/horizon) · Redis: [Redis prerequisite](/docs/redis-prerequisite) · Jobs: [Operations](/docs/operations) · UI: [Dashboard](/docs/dashboard)

## What Externa does

| Item        | Detail                                                                               |
| ----------- | ------------------------------------------------------------------------------------ |
| Package     | `laravel/horizon`                                                                    |
| Config      | `config/horizon.php`                                                                 |
| Provider    | `App\Providers\HorizonServiceProvider`                                               |
| Primary UI  | Dashboard **Health** tab — native status / pending / failed / throughput / workloads |
| Advanced UI | `/horizon` (super-admin deep dive; **no** primary “Open Horizon” CTA on Health)      |
| Gate        | `viewHorizon` — super-admin (`EffectivePermissionResolver::isSuperAdmin`)            |

## Env / commands

```ini
QUEUE_CONNECTION=redis
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
```

```bash
# Prefer PHP 8.4 (Herd)
php84 artisan horizon
```

With Herd Redis + Herd Reverb already up, pair Horizon with `pulse:work` (see [Minimal vs full stack](/docs/minimal-vs-full-stack)). Standalone all-in-one: `composer run dev:full` (also starts `reverb:start` — skip that process if Herd Reverb owns `:8080`).

Docker Compose runs Horizon as the `horizon` service — [Installation — Docker](/docs/installation#docker-compose-local-full-stack).

Graceful restart after deploy: `php artisan horizon:terminate`.

## Supervisor (production)

Run `php artisan horizon` under Supervisor/systemd (not `queue:work` when Horizon is the chosen worker). See [Horizon — deploying](https://laravel.com/docs/13.x/horizon#deploying-horizon).

## Fail / retry UI

Queue health appears on the Inertia dashboard **Health** tab. Open `/horizon` as a super-admin only when you need deep job inspection, failures, and retries. The Inertia admin **Jobs** page remains a separate app-level monitor (`CanShowJobs`) over `jobs` / `failed_jobs`.

Super-admins with `viewHorizon` can also navigate to `/horizon` from Settings → **Performance** (`/settings/performance`) — the **Observability** section shows quick links when permitted. See [Operations](/docs/operations).
