mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-12 19:50:57 +05:00
Honor the OpenCode recovery deadline
This commit is contained in:
parent
944907bfee
commit
8a12e3399c
@ -411,7 +411,9 @@ def _ensure_opencode(settings: dict) -> tuple[bool, str]:
|
||||
if remaining <= 0:
|
||||
break
|
||||
if _health(settings, timeout=min(2, remaining)):
|
||||
return True, ""
|
||||
if time.monotonic() <= deadline:
|
||||
return True, ""
|
||||
break
|
||||
remaining = deadline - time.monotonic()
|
||||
if remaining > 0:
|
||||
time.sleep(min(0.25, remaining))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user