Fix health check: DB file is always local, not remote
In REMOTE_MODE the SQLite database lives inside the MCP container, not on the remote HAProxy host. Check db_file with os.path.exists instead of remote_file_exists. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -90,7 +90,11 @@ def register_health_tools(mcp):
|
|||||||
files_ok = True
|
files_ok = True
|
||||||
file_status: dict[str, str] = {}
|
file_status: dict[str, str] = {}
|
||||||
for name, path in [("map_file", MAP_FILE), ("db_file", DB_FILE)]:
|
for name, path in [("map_file", MAP_FILE), ("db_file", DB_FILE)]:
|
||||||
exists = remote_file_exists(path) if REMOTE_MODE else __import__('os').path.exists(path)
|
# DB file is always local (SQLite runs in MCP container), map_file may be remote
|
||||||
|
if name == "db_file" or not REMOTE_MODE:
|
||||||
|
exists = __import__('os').path.exists(path)
|
||||||
|
else:
|
||||||
|
exists = remote_file_exists(path)
|
||||||
if exists:
|
if exists:
|
||||||
file_status[name] = "ok"
|
file_status[name] = "ok"
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user