Merge remote-tracking branch 'origin/api-v1.11.0' into dev
This commit is contained in:
commit
2e3457a257
1 changed files with 10 additions and 8 deletions
|
|
@ -5,14 +5,16 @@ from routers.base import get_routers
|
|||
|
||||
public_app, app, app_apikey = get_routers()
|
||||
|
||||
health_router = public_app
|
||||
|
||||
if tenants.tenants_exists(use_pool=False):
|
||||
health_router = app
|
||||
|
||||
|
||||
@health_router.get('/health', tags=["health-check"])
|
||||
@app.get('/health', tags=["health-check"])
|
||||
def get_global_health_status():
|
||||
if tenants.tenants_exists():
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"Not Found")
|
||||
return {"data": health.get_health()}
|
||||
|
||||
|
||||
if not tenants.tenants_exists(use_pool=False):
|
||||
@public_app.get('/health', tags=["health-check"])
|
||||
def get_public_health_status():
|
||||
if tenants.tenants_exists():
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"Not Found")
|
||||
|
||||
return get_global_health_status()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue