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

Add units (nanoseconds) to HealthCheck. #2187

Merged
merged 12 commits into from
Oct 26, 2023

Conversation

SLG
Copy link
Contributor

@SLG SLG commented Aug 21, 2023

I need to add a manual healtcheck in code. I found the com.github.dockerjava.api.model.HealthCheck:

return new HealthCheck()
                .withTest(Arrays.asList("CMD", "curl", "-f", url))
                .withStartPeriod(SECONDS.toNanos(60))
                .withInterval(SECONDS.toNanos(30))
                .withTimeout(SECONDS.toNanos(30))
                .withRetries(50);

However, I've no idea what the correct unit should be.
I've tried seconds (too small), millis (too small value too), micro (seems to work, but still timing out) and nanos (seems to be the correct one).

@SLG SLG requested a review from a team as a code owner August 21, 2023 08:41
@eddumelendez
Copy link
Member

Hi, Thanks for the PR! Yes, according to the docs is nanoseconds

Screenshot 2023-08-21 at 13 30 39

@eddumelendez eddumelendez added this to the next milestone Aug 21, 2023
@eddumelendez eddumelendez merged commit d138d51 into docker-java:main Oct 26, 2023
4 checks passed
@eddumelendez
Copy link
Member

Thanks for your contribution, @SLG !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants