refactor(cli): remove --data-dir, add --root-dir

--data-dir: ~/logseq/graphs
--root-dir: ~/logseq

All other configuration files and data directories are derived from the root-dir
This commit is contained in:
rcmerci
2026-04-24 22:35:00 +08:00
parent aee05aa5d4
commit f751f27a63
50 changed files with 1012 additions and 932 deletions

View File

@@ -128,9 +128,10 @@ def auth_cognito_from_auth_file(auth_path: Path) -> Dict[str, str]:
def wait_health(base_url: str, timeout_s: float, interval_s: float) -> bool:
deadline = time.time() + timeout_s
url = base_url.rstrip("/") + "/health"
opener = urllib.request.build_opener(urllib.request.ProxyHandler({}))
while time.time() < deadline:
try:
with urllib.request.urlopen(url, timeout=2) as response:
with opener.open(url, timeout=2) as response:
if response.status == 200:
return True
except (urllib.error.URLError, TimeoutError, socket.timeout):