SDK: artifacts work outside a node, run --follow prints status and queue waits, fluksio cancel
save_artifact/load_artifact outside a node use the worker's own store code in $FLUKSIO_ARTIFACT_DIR or <tmp>/fluksio-artifacts, so a node can be called by hand. --follow prints status changes and each node's resource wait; the placer's waiting snapshot now carries the run. fluksio cancel <run>...
This commit is contained in:
@@ -176,7 +176,7 @@ def test_a_node_waits_for_a_busy_machine_and_says_so(loop):
|
||||
started = threading.Event()
|
||||
|
||||
def second() -> None:
|
||||
with placer.claim(Resources(cpus=2), node="study.b"):
|
||||
with placer.claim(Resources(cpus=2), node="study.b", run="r2"):
|
||||
started.set()
|
||||
|
||||
with placer.claim(Resources(cpus=2), node="study.a"):
|
||||
@@ -185,6 +185,8 @@ def test_a_node_waits_for_a_busy_machine_and_says_so(loop):
|
||||
# Long enough to have run if nothing was holding it back.
|
||||
assert not started.wait(0.3)
|
||||
assert placer.snapshot()["waiting"][0]["node"] == "study.b"
|
||||
# Whose wait it is, so a client following one run reads only its own.
|
||||
assert placer.snapshot()["waiting"][0]["run"] == "r2"
|
||||
assert events[0]["type"] == "node_queued"
|
||||
assert "2 cpu(s)" in events[0]["detail"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user