From fda8eb503042574f9784c70ccf4cdf4daf4b2c20 Mon Sep 17 00:00:00 2001 From: George Dumitrescu Date: Sat, 15 Aug 2026 19:47:08 +0300 Subject: [PATCH] feat: declare the queue worker's redis requirement A queue worker dies on a DNS error when the site's queue connection is redis and lerd-redis is not running, and the message PHP produces says nothing about which service to start. lerd caught that with a check written into the binary, which put the env key, the worker name and the service name in Go, where no framework knowledge belongs. The requirement is declared here instead, scoped by when_env so it only applies to a site whose .env actually asks for the redis connection. Binaries that predate the field ignore it and keep their own check, so the rollout costs nothing. --- frameworks/laravel/10.yaml | 5 +++++ frameworks/laravel/11.yaml | 5 +++++ frameworks/laravel/12.yaml | 5 +++++ frameworks/laravel/13.yaml | 5 +++++ frameworks/laravel/6.yaml | 5 +++++ frameworks/laravel/7.yaml | 5 +++++ frameworks/laravel/8.yaml | 5 +++++ frameworks/laravel/9.yaml | 5 +++++ 8 files changed, 40 insertions(+) diff --git a/frameworks/laravel/10.yaml b/frameworks/laravel/10.yaml index 4d85471..07f9a80 100644 --- a/frameworks/laravel/10.yaml +++ b/frameworks/laravel/10.yaml @@ -110,6 +110,11 @@ workers: command: php artisan queue:work --queue=default --tries=3 --timeout=60 tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} restart_command: php artisan queue:restart + # The worker dies on a DNS error when the queue is Redis and lerd-redis is + # down, so lerd refuses the start with the service to run instead. + requires_service: + name: redis + when_env: QUEUE_CONNECTION=redis restart: always exclude_check: composer: laravel/horizon diff --git a/frameworks/laravel/11.yaml b/frameworks/laravel/11.yaml index 68b78b6..5e9b9b7 100644 --- a/frameworks/laravel/11.yaml +++ b/frameworks/laravel/11.yaml @@ -110,6 +110,11 @@ workers: command: php artisan queue:work --queue=default --tries=3 --timeout=60 tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} restart_command: php artisan queue:restart + # The worker dies on a DNS error when the queue is Redis and lerd-redis is + # down, so lerd refuses the start with the service to run instead. + requires_service: + name: redis + when_env: QUEUE_CONNECTION=redis restart: always exclude_check: composer: laravel/horizon diff --git a/frameworks/laravel/12.yaml b/frameworks/laravel/12.yaml index dd204a8..4165027 100644 --- a/frameworks/laravel/12.yaml +++ b/frameworks/laravel/12.yaml @@ -110,6 +110,11 @@ workers: command: php artisan queue:work --queue=default --tries=3 --timeout=60 tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} restart_command: php artisan queue:restart + # The worker dies on a DNS error when the queue is Redis and lerd-redis is + # down, so lerd refuses the start with the service to run instead. + requires_service: + name: redis + when_env: QUEUE_CONNECTION=redis restart: always exclude_check: composer: laravel/horizon diff --git a/frameworks/laravel/13.yaml b/frameworks/laravel/13.yaml index 3d3a11f..623c8a3 100644 --- a/frameworks/laravel/13.yaml +++ b/frameworks/laravel/13.yaml @@ -110,6 +110,11 @@ workers: command: php artisan queue:work --queue=default --tries=3 --timeout=60 tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} restart_command: php artisan queue:restart + # The worker dies on a DNS error when the queue is Redis and lerd-redis is + # down, so lerd refuses the start with the service to run instead. + requires_service: + name: redis + when_env: QUEUE_CONNECTION=redis restart: always exclude_check: composer: laravel/horizon diff --git a/frameworks/laravel/6.yaml b/frameworks/laravel/6.yaml index 1c89ad9..15b9914 100644 --- a/frameworks/laravel/6.yaml +++ b/frameworks/laravel/6.yaml @@ -110,6 +110,11 @@ workers: command: php artisan queue:work --queue=default --tries=3 --timeout=60 tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} restart_command: php artisan queue:restart + # The worker dies on a DNS error when the queue is Redis and lerd-redis is + # down, so lerd refuses the start with the service to run instead. + requires_service: + name: redis + when_env: QUEUE_CONNECTION=redis restart: always exclude_check: composer: laravel/horizon diff --git a/frameworks/laravel/7.yaml b/frameworks/laravel/7.yaml index d8e52e5..b536e5d 100644 --- a/frameworks/laravel/7.yaml +++ b/frameworks/laravel/7.yaml @@ -110,6 +110,11 @@ workers: command: php artisan queue:work --queue=default --tries=3 --timeout=60 tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} restart_command: php artisan queue:restart + # The worker dies on a DNS error when the queue is Redis and lerd-redis is + # down, so lerd refuses the start with the service to run instead. + requires_service: + name: redis + when_env: QUEUE_CONNECTION=redis restart: always exclude_check: composer: laravel/horizon diff --git a/frameworks/laravel/8.yaml b/frameworks/laravel/8.yaml index 05dfc88..56bd967 100644 --- a/frameworks/laravel/8.yaml +++ b/frameworks/laravel/8.yaml @@ -110,6 +110,11 @@ workers: command: php artisan queue:work --queue=default --tries=3 --timeout=60 tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} restart_command: php artisan queue:restart + # The worker dies on a DNS error when the queue is Redis and lerd-redis is + # down, so lerd refuses the start with the service to run instead. + requires_service: + name: redis + when_env: QUEUE_CONNECTION=redis restart: always exclude_check: composer: laravel/horizon diff --git a/frameworks/laravel/9.yaml b/frameworks/laravel/9.yaml index 79fd030..07730cc 100644 --- a/frameworks/laravel/9.yaml +++ b/frameworks/laravel/9.yaml @@ -110,6 +110,11 @@ workers: command: php artisan queue:work --queue=default --tries=3 --timeout=60 tune_command: php artisan queue:work --queue={queue} --tries={tries} --timeout={timeout} restart_command: php artisan queue:restart + # The worker dies on a DNS error when the queue is Redis and lerd-redis is + # down, so lerd refuses the start with the service to run instead. + requires_service: + name: redis + when_env: QUEUE_CONNECTION=redis restart: always exclude_check: composer: laravel/horizon