Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Health Check Not Working as Expected #331

@JokaHD

Description

@JokaHD

While following the Healthchecks documentation, I encountered an issue where the health check wasn't functioning as expected. When attempting to access the health endpoint, the following error occurred:

>> curl localhost:8001/health
curl: (7) Failed to connect to localhost port 8001 after 0 ms: Couldn't connect to server

I discovered that the key worker_healthcheck_port here might be incorrect.

worker_healthcheck_enabled = (
str(
get_config_value(
"worker_healthcheck_port",
"HATCHET_CLIENT_WORKER_HEALTHCHECK_ENABLED",
)
)
== "True"
)

Additionally, there might be an issue with the boolean check. I suggest adding .lower() to the comparison to make it case-insensitive, like so:

worker_healthcheck_enabled = (
    str(
        get_config_value(
            "worker_healthcheck_enabled", 
            "HATCHET_CLIENT_WORKER_HEALTHCHECK_ENABLED",
        )
    ).lower() == "true"
)

Thank you for taking the time to review this issue. If you need any further clarification or discussion, feel free to ask. I appreciate your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions