8000 Add units (nanoseconds) to HealthCheck. by SLG · Pull Request #2187 · docker-java/docker-java · GitHub
[go: up one dir, main page]

Skip to content

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
@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.

2 participants

0