Better emulate metadata
Some checks failed
checks-impure / test (pull_request) Successful in 26s
checks / test (pull_request) Failing after 1m47s

This commit is contained in:
2024-01-13 20:54:56 +01:00
parent 4ae4557602
commit f4cf817bf1
6 changed files with 67 additions and 24 deletions

View File

@@ -6,14 +6,13 @@ from datetime import datetime
from fastapi import FastAPI
from fastapi.responses import HTMLResponse, JSONResponse
import clan_cli.config as config
from clan_cli.webui.schemas import Resolution
from .config import config
app_dlg = FastAPI()
app_ap = FastAPI()
app_c1 = FastAPI()
app_c2 = FastAPI()
app_dlg = FastAPI(swagger_ui_parameters={"tryItOutEnabled": True})
app_ap = FastAPI(swagger_ui_parameters={"tryItOutEnabled": True})
app_c1 = FastAPI(swagger_ui_parameters={"tryItOutEnabled": True})
app_c2 = FastAPI(swagger_ui_parameters={"tryItOutEnabled": True})
apps = [
(app_dlg, config.port_dlg),
@@ -24,21 +23,41 @@ apps = [
#### HEALTHCHECK
@app_c1.get("/")
async def root_c1() -> str:
return "C1 is alive"
@app_c1.get("/health")
async def healthcheck_c1() -> str:
return "200 OK"
@app_c2.get("/")
async def root_c2() -> str:
return "C2 is alive"
@app_c2.get("/health")
async def healthcheck_c2() -> str:
return "200 OK"
@app_dlg.get("/")
async def root_dlg() -> str:
return "DLG is alive"
@app_dlg.get("/health")
async def healthcheck_dlg() -> str:
return "200 OK"
@app_ap.get("/")
async def root_ap() -> str:
return "AP is alive"
@app_ap.get("/health")
async def healthcheck_ap() -> str:
return "200 OK"