Commit 89a11660 authored by nanahira's avatar nanahira

fix

parent e88eba2e
Pipeline #36925 passed with stages
in 1 minute and 27 seconds
......@@ -64,8 +64,8 @@ FeaturesDict = {
FeaturesJson = json.dumps(FeaturesDict)
# Thread‑safe health flag
_health_lock = threading.Lock()
_is_healthy: bool = True
#_health_lock = threading.Lock()
#_is_healthy: bool = True
# ---------------------------------------------------------------------------
# Redis (same sync client—the API is blocking so FastAPI’s default thread‑pool
......@@ -263,7 +263,7 @@ async def doSearch(screen_name: str, client: httpx.AsyncClient) -> Optional[List
print("Search Error parsing JSON:", r.text)
return None
global _is_healthy
# global _is_healthy
_is_healthy = "data" in data
if not _is_healthy:
print("Search error:", r.text)
......@@ -611,7 +611,7 @@ class HealthyResponse(BaseModel):
healthy: bool
@app.get("/_healthy", response_model=HealthyResponse)
async def healthy():
def healthy():
# The old behaviour always answered 200 unless the global flag failed.
# Keeping that.
return HealthyResponse(healthy=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment