Skip to content

return exit code from terminate command#1718

Merged
taylorotwell merged 2 commits intolaravel:5.xfrom
webard:feature/handle-exit-code-terminate-command
Feb 27, 2026
Merged

return exit code from terminate command#1718
taylorotwell merged 2 commits intolaravel:5.xfrom
webard:feature/handle-exit-code-terminate-command

Conversation

@webard
Copy link
Contributor

@webard webard commented Feb 27, 2026

Currently, when horizon:terminate returns an error, the command still exits with the default statusCode = 0, which indicates success.

As a result, automation scripts such as Deployer do not report a failure and instead mark the step as successful.

The problem occurs, for example, when the queue is running under a different user than the one attempting to restart it. In that case, we receive the message:

ERROR  Failed to kill process: 109462 (Operation not permitted).

However, Deployer still treats this as a success and continues the deployment process, even though the code has not actually been updated because the queue was not restarted.

@taylorotwell taylorotwell merged commit a7dd56d into laravel:5.x Feb 27, 2026
17 of 18 checks passed
lewislarsen pushed a commit to lewislarsen/horizon that referenced this pull request Mar 2, 2026
* return exit code from terminate command

* formatting

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants