Skip to content
Snippets Groups Projects

Resolve "feature/ETQ Admin, je veux que ssham selle le vault au signal de fin"

1 file
+ 5
5
Compare changes
  • Side-by-side
  • Inline
+ 5
5
@@ -3,9 +3,9 @@ import logging
from .views import app
from . import models
import signal
import sys
import requests
from ssham.lib.vault import Vault
import sys
def handler(signal_received, frame):
@@ -59,15 +59,15 @@ lg.addHandler(_consolehandler)
try:
print(" Check Vault status...")
lg.debug("__init__ - Vault address = " + app.config['VAULT_ADDR'])
lg.debug("__init__ - Vault health address = " + app.config['VAULT_HEALTH'])
lg.debug(f"__init__ - Vault address = {app.config['VAULT_ADDR']})
lg.debug(f"__init__ - Vault health address = {app.config['VAULT_HEALTH']})
vault_health_response = requests.head(app.config['VAULT_HEALTH'])
vault_status = vault_health_response.status_code
except requests.exceptions.ConnectionError as error:
lg.critical("Impossible to connect to Vault health address " + app.config['VAULT_HEALTH'])
lg.critical(f"Impossible to connect to Vault health address {app.config['VAULT_HEALTH']})
lg.debug(str(error))
exit()
if vault_status == 503 or vault_status == 501: # Sealed or Not initialized
print(" Vault is started")
lg.debug("__init__ - Vault status code = " + str(vault_status))
Loading