forked from mtusi2026/mtusi2026lab4
Перенести собственную базу лабораторной 3 с сохранением задания и контракта
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"""Жизнь процесса и готовность критичного хранилища проверяются отдельно."""
|
||||
from fastapi import APIRouter
|
||||
from src.models import Health
|
||||
from src.storage import storage
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get('/health/live')
|
||||
def liveness():
|
||||
return Health()
|
||||
|
||||
|
||||
@router.get('/health/ready')
|
||||
def readiness():
|
||||
storage.ready()
|
||||
return Health()
|
||||
|
||||
|
||||
@router.get('/stats')
|
||||
def stats():
|
||||
return storage.get_stats()
|
||||
Reference in New Issue
Block a user