Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different exit codes for paused and inactive horizon status #1471

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

CanvasCompanyHylke
Copy link
Contributor

For our Docker setup, we use the horizon:status command for the health check. So if Horizon fails to load or crashes, it starts a new container.

Now we pause the running Horizon processes before we push an update. This way we can update the web image and launch a new Horizon image, without an old Horizon image complaining about jobs it doesn't understand (new job created in new image code for example).

But now that we added the health checks for the Horizon images too, the image is being replaced with a new instance of the old image immediately, because the paused status triggers the failing exit code of the status command (which is oke, because it is not running indeed). To determine if the Horizon is just paused or actually inactive, it would be nice if we had different exit codes. This way we can check for exit code 2 to relaunch the existing image in a new container. and leave the paused containers "running".

This could break other peoples script, based on a specific exit code, tho a basic non success check should suffice for the old and new way. So I'm not sure if we can push this without any minor version increase or whatsoever.

For our Docker setup, we use the `horizon:status` command for the health check. So if Horizon fails to load or crashes, it starts a new container.

Now we pause the running Horizon processes before we push an update. This way we can update the web image and launch a new Horizon image, without an old Horizon image complaining about jobs it doesn't understand (new job created in new image code for example).

But now that we added the health checks for the Horizon images too, the image is being replaced with a new instance of the old image immediately, because the paused status triggers the failing exit code of the status command (which is oke, because it is not running indeed).
To determine if the Horizon is just paused or actually inactive, it would be nice if we had different exit codes. This way we can check for exit code 2 to relaunch the existing image in  a new container. and leave the paused containers "running".

This could break other peoples script, based on a specific exit code, tho a basic non success check should suffice for the old and new way. So I'm not sure if we can push this without any minor version increase or whatsoever.
@CanvasCompanyHylke CanvasCompanyHylke changed the title Differentiate exit codes for paused and inactive horizon status Different exit codes for paused and inactive horizon status Jul 5, 2024
@taylorotwell taylorotwell merged commit 81e62ce into laravel:5.x Jul 5, 2024
12 checks passed
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