Add update-available banner + versioned /health endpoint
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
46441c3b35
commit
951a362dfd
4 changed files with 103 additions and 7 deletions
|
|
@ -1,4 +1,6 @@
|
|||
import logging
|
||||
import os
|
||||
import time
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
from fastapi import FastAPI
|
||||
|
|
@ -57,10 +59,11 @@ app = FastAPI(
|
|||
version="1.0.0",
|
||||
lifespan=lifespan,
|
||||
)
|
||||
STARTED_AT = str(int(time.time() * 1000))
|
||||
|
||||
app.include_router(kds_api.router, prefix="/api/kds", tags=["KDS"])
|
||||
|
||||
|
||||
@app.get("/health")
|
||||
async def health_check():
|
||||
return {"status": "healthy"}
|
||||
return {"status": "healthy", "version": os.environ.get("BUILD_VERSION", STARTED_AT)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue