mirror of
https://github.com/razzant/ouroboros.git
synced 2026-10-15 17:36:54 +00:00
Merge daemon warmup admission fix
Owner-authorized follow-up. Live runtime remains unchanged until its normal managed update.
This commit is contained in:
commit
75b94cfc0d
2 changed files with 8 additions and 2 deletions
|
|
@ -970,7 +970,13 @@ def warm_owned_daemon() -> bool:
|
|||
|
||||
def warm() -> None:
|
||||
try:
|
||||
ensure_owned_gateway().close()
|
||||
# Warmup is the host's speculative join, so give an already
|
||||
# custodied daemon enough room to finish journal admission after
|
||||
# its control socket appears. A normal caller keeps the shorter
|
||||
# admission window; expiry still leaves custody intact and the
|
||||
# first real caller simply joins the same startup.
|
||||
warmup_admission_wait = max(_ADMISSION_WAIT_SEC, _SPAWN_WAIT_SEC * 2.0)
|
||||
ensure_owned_gateway(admission_wait_sec=warmup_admission_wait).close()
|
||||
except Exception:
|
||||
log.info("Owned daemon warmup did not reach readiness; the first caller starts or joins",
|
||||
exc_info=True)
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ def test_warmup_is_one_background_ensure_for_a_provisioned_home_only(restart_roo
|
|||
descriptor.write_text("{}")
|
||||
assert owned.warm_owned_daemon() is True
|
||||
_join_warmup_thread()
|
||||
assert ensures == [("ensure", {}), "closed"]
|
||||
assert ensures == [("ensure", {"admission_wait_sec": 40.0}), "closed"]
|
||||
|
||||
def unreachable(**kw):
|
||||
raise RuntimeError("fixture daemon down")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue