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:
kappa
2026-02-08 11:21:08 +09:00
parent e228fc02fb
commit 0803d7db92

View File

@@ -90,7 +90,11 @@ def register_health_tools(mcp):
files_ok = True
file_status: dict[str, str] = {}
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:
file_status[name] = "ok"
else: