mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2025-03-15 09:50:20 +08:00
Use httpstatus code
This commit is contained in:
parent
d7bbb3280e
commit
ad83234e77
3
main.py
3
main.py
@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import time
|
||||
from http import HTTPStatus
|
||||
|
||||
import uvicorn.config
|
||||
from bs4 import BeautifulSoup
|
||||
@ -34,7 +35,7 @@ async def health_check():
|
||||
health_check_request = read_item(
|
||||
LinkRequest.model_construct(url="https://prowlarr.servarr.com/v1/ping")
|
||||
)
|
||||
if health_check_request.solution.status != 200:
|
||||
if health_check_request.solution.status != HTTPStatus.OK:
|
||||
raise HTTPException(
|
||||
status_code=500,
|
||||
detail="Health check failed",
|
||||
|
Loading…
x
Reference in New Issue
Block a user