postgres healthcheck works

This commit is contained in:
Pablo Martin 2024-08-09 14:45:10 +02:00
parent 91c79357f8
commit c38ce5cfe6
9 changed files with 203 additions and 8 deletions

View file

@ -4,7 +4,10 @@ import click
import pyfiglet
from anaxi.logging import get_anaxi_logger
from anaxi.processes import run_cosmos_db_healthcheck_process
from anaxi.processes import (
run_cosmos_db_healthcheck_process,
run_postgres_healthcheck_process,
)
logger = get_anaxi_logger(__name__)
@ -36,3 +39,11 @@ def cosmos_db_healthcheck(cosmos_db_id):
logger.info("Starting a Cosmos DB healthcheck.")
run_cosmos_db_healthcheck_process(cosmos_db_id)
logger.info("Finished the Cosmos DB healthcheck.")
@cli.command()
@click.option("--postgres-database", type=click.STRING, required=True)
def postgres_healthcheck(postgres_database):
logger.info("Starting a Postgres healthcheck.")
run_postgres_healthcheck_process(postgres_database)
logger.info("Finished the Postgres healthcheck.")