diff options
author | Victor Näslund <victor@sunet.se> | 2022-11-16 23:22:25 +0100 |
---|---|---|
committer | Victor Näslund <victor@sunet.se> | 2022-11-16 23:22:25 +0100 |
commit | 45eb98199215ac26e04c02091485b02470e2e46e (patch) | |
tree | c30bf2f9afd14a26f91e5de2dfb576bc233c58a5 /src/soc_collector/healthcheck.py | |
parent | 340a77a4f120cc92192e07b95e1d4b342749cf50 (diff) |
fixed healthcheck and client CLI small stuff
Diffstat (limited to 'src/soc_collector/healthcheck.py')
-rw-r--r-- | src/soc_collector/healthcheck.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/soc_collector/healthcheck.py b/src/soc_collector/healthcheck.py index e561fa0..1ccd8f3 100644 --- a/src/soc_collector/healthcheck.py +++ b/src/soc_collector/healthcheck.py @@ -7,16 +7,18 @@ import json import requests +from src.soc_collector.auth import load_api_keys def check_collector() -> bool: """Check our collector using /info :return: bool """ - time.sleep(2) # Prevent race condition with redis container healthcheck + time.sleep(2) # Prevent race condition with mongodb container healthcheck req = requests.get( "https://localhost:8000/info", + headers={"API-KEY": load_api_keys("./api_keys.txt")[-1]}, timeout=3, verify="./collector_root_ca.crt", ) |