healthcheck
This commit is contained in:
parent
dbba7a1090
commit
f8e532d017
3 changed files with 21 additions and 1 deletions
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
|
@ -15,5 +15,5 @@
|
|||
],
|
||||
"python.testing.unittestEnabled": false,
|
||||
"python.testing.pytestEnabled": true,
|
||||
"python.analysis.typeCheckingMode": "basic",
|
||||
"python.analysis.typeCheckingMode": "off",
|
||||
}
|
||||
10
anaxi/cli.py
10
anaxi/cli.py
|
|
@ -4,6 +4,8 @@ import logging
|
|||
import click
|
||||
import pyfiglet
|
||||
|
||||
from anaxi.processes import run_cosmos_db_healthcheck_process
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
format="%(asctime)s - [%(levelname)s] - %(filename)s - L%(lineno)d - %(message)s",
|
||||
|
|
@ -32,3 +34,11 @@ def smoke_test():
|
|||
|__,'`-..--|__|--''
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.option("--cosmos-db-id", type=click.STRING)
|
||||
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.")
|
||||
|
|
|
|||
10
anaxi/processes.py
Normal file
10
anaxi/processes.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import logging
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
def run_cosmos_db_healthcheck_process(cosmos_db_id: str) -> None:
|
||||
|
||||
logger.info(
|
||||
f"If I had a cosmos db connector, I would really try to hit this database: {cosmos_db_id}"
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue