mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-09-23 01:10:42 +02:00
fix: add version to health endpoint + warn users with stale compose files
Repo migration in March 2026 rewrote all commit hashes, leaving old clones with a docker-compose.yml that builds from source instead of pulling pre-built images. Added detection warnings to compose.sh, start.bat, and start.sh so affected users see clear instructions. Also exposes APP_VERSION in /api/health for easier debugging.
This commit is contained in:
@@ -12,6 +12,8 @@ from dataclasses import dataclass, field
|
||||
from typing import Any
|
||||
from json import JSONDecodeError
|
||||
|
||||
APP_VERSION = "0.9.6"
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
_start_time = time.time()
|
||||
@@ -6667,6 +6669,7 @@ async def health_check(request: Request):
|
||||
last = d.get("last_updated")
|
||||
return {
|
||||
"status": "ok",
|
||||
"version": APP_VERSION,
|
||||
"last_updated": last,
|
||||
"sources": {
|
||||
"flights": len(d.get("commercial_flights", [])),
|
||||
|
||||
@@ -4,6 +4,7 @@ from typing import Optional, Dict, List, Any
|
||||
|
||||
class HealthResponse(BaseModel):
|
||||
status: str
|
||||
version: str = ""
|
||||
last_updated: Optional[str] = None
|
||||
sources: Dict[str, int]
|
||||
freshness: Dict[str, str]
|
||||
|
||||
Reference in New Issue
Block a user