Skip to content

Conversation

@penguincoder
Copy link
Contributor

This adds a readiness check very similar to what is done in the Docker world to check for rabbitmq readiness.

I have some async workers that can boot faster than rabbitmq, so it would be nice to have a healthcheck that gates my code until the process actually responds.

@domenkozar domenkozar merged commit f5daada into cachix:main Jun 6, 2023
process-compose = {
readiness_probe = {
exec.command = "${cfg.package}/bin/rabbitmq-diagnostics -q ping";
initial_delay_seconds = 10;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a tad bit too high for me.
It should be fine to have the check fail a few times in case the process starts up faster than 10 seconds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was about 8 seconds on my M1 Pro, and with a 10 second period, it would end up being something like 20 seconds before it would be considered ready otherwise. I can definitely lower it, though, maybe even switch to a 5 second period instead. It's not a very taxing command.

@penguincoder penguincoder deleted the rabbitmq-readiness-check branch June 7, 2023 14:02
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.

3 participants