diff --git a/frameworks/laravel/10.yaml b/frameworks/laravel/10.yaml index b13e4c5..f84298b 100644 --- a/frameworks/laravel/10.yaml +++ b/frameworks/laravel/10.yaml @@ -120,6 +120,7 @@ workers: restart: always exclude_check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis schedule: label: Task Scheduler icon: clock @@ -134,6 +135,7 @@ workers: restart: always check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis conflicts_with: - queue vite: diff --git a/frameworks/laravel/11.yaml b/frameworks/laravel/11.yaml index f10dedc..44c1eca 100644 --- a/frameworks/laravel/11.yaml +++ b/frameworks/laravel/11.yaml @@ -120,6 +120,7 @@ workers: restart: always exclude_check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis schedule: label: Task Scheduler icon: clock @@ -151,6 +152,7 @@ workers: restart: always check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis conflicts_with: - queue vite: diff --git a/frameworks/laravel/12.yaml b/frameworks/laravel/12.yaml index 18e37b0..2c86ba2 100644 --- a/frameworks/laravel/12.yaml +++ b/frameworks/laravel/12.yaml @@ -120,6 +120,7 @@ workers: restart: always exclude_check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis schedule: label: Task Scheduler icon: clock @@ -151,6 +152,7 @@ workers: restart: always check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis conflicts_with: - queue vite: diff --git a/frameworks/laravel/13.yaml b/frameworks/laravel/13.yaml index e568636..41f2838 100644 --- a/frameworks/laravel/13.yaml +++ b/frameworks/laravel/13.yaml @@ -120,6 +120,7 @@ workers: restart: always exclude_check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis schedule: label: Task Scheduler icon: clock @@ -151,6 +152,7 @@ workers: restart: always check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis conflicts_with: - queue vite: diff --git a/frameworks/laravel/6.yaml b/frameworks/laravel/6.yaml index d373ed5..faa7ad6 100644 --- a/frameworks/laravel/6.yaml +++ b/frameworks/laravel/6.yaml @@ -120,6 +120,7 @@ workers: restart: always exclude_check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis schedule: label: Task Scheduler icon: clock @@ -134,6 +135,7 @@ workers: restart: always check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis conflicts_with: - queue # Mix rebuilds into public/, which nginx already serves, so unlike vite there diff --git a/frameworks/laravel/7.yaml b/frameworks/laravel/7.yaml index 3c0ea75..706ee67 100644 --- a/frameworks/laravel/7.yaml +++ b/frameworks/laravel/7.yaml @@ -120,6 +120,7 @@ workers: restart: always exclude_check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis schedule: label: Task Scheduler icon: clock @@ -134,6 +135,7 @@ workers: restart: always check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis conflicts_with: - queue # Mix rebuilds into public/, which nginx already serves, so unlike vite there diff --git a/frameworks/laravel/8.yaml b/frameworks/laravel/8.yaml index d762239..d11298e 100644 --- a/frameworks/laravel/8.yaml +++ b/frameworks/laravel/8.yaml @@ -120,6 +120,7 @@ workers: restart: always exclude_check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis schedule: label: Task Scheduler icon: clock @@ -134,6 +135,7 @@ workers: restart: always check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis conflicts_with: - queue # Mix rebuilds into public/, which nginx already serves, so unlike vite there diff --git a/frameworks/laravel/9.yaml b/frameworks/laravel/9.yaml index eaa2e3e..a0ed579 100644 --- a/frameworks/laravel/9.yaml +++ b/frameworks/laravel/9.yaml @@ -120,6 +120,7 @@ workers: restart: always exclude_check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis schedule: label: Task Scheduler icon: clock @@ -134,6 +135,7 @@ workers: restart: always check: composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis conflicts_with: - queue vite: diff --git a/packages/laravel-horizon.yaml b/packages/laravel-horizon.yaml index 6b0a3ab..d786bd6 100644 --- a/packages/laravel-horizon.yaml +++ b/packages/laravel-horizon.yaml @@ -11,6 +11,11 @@ workers: command: php artisan horizon reload_command: php artisan horizon:listen restart: always + # Horizon reads only Redis. Paired with composer so a binary that predates + # when_env still sees the rule it always did. + check: + composer: laravel/horizon + when_env: QUEUE_CONNECTION=redis conflicts_with: - queue @@ -21,3 +26,13 @@ suggest_services: reason: Horizon runs its queues on Redis - name: valkey reason: Redis-compatible queues for Horizon + +doctor: + checks: + - name: horizon_queue_connection + type: env_combo + check: + composer: laravel/horizon + warn_if: + QUEUE_CONNECTION: database + detail: "Horizon only processes Redis queues, and QUEUE_CONNECTION is database. Set QUEUE_CONNECTION=redis to use Horizon, or run the queue worker for database jobs."