fftools.healthchecks
¶
- class fftools.healthchecks.HealthChecks(url: str, path: str, ping_key: str | None = None)[source]¶
Bases:
object
ping healthchecks.
you can use <HOSTNAME> in the path for the formatted hostname of the device.
- __init__(url: str, path: str, ping_key: str | None = None) None [source]¶
init the healthchecks api.
- exit_code(exit_code: str | int, message: str | None = None) tuple[int, str] [source]¶
ping with status: exit_code.
send the exit code of the program to healthchecks.
- fail(message: str | None = None) tuple[int, str] [source]¶
ping with status: fail.
fails the current job.
- Parameters:
message (str | None) – message to add to ping body. Defaults to None.
- Returns:
http response code, http response body
- Return type:
tuple with
- log(message: str) tuple[int, str] [source]¶
ping with status: log.
sends a log to the current job. does not stop or fail the job.
- Parameters:
message (str) – message to add to ping body.
- Returns:
http response code, http response body
- Return type:
tuple with