mirror of
https://github.com/logseq/logseq.git
synced 2026-05-26 21:54:26 +00:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user