chore: Update version to 0.12.11, upgrade BlendJob wheel to 0.1.13, and enhance documentation for environment installation and model management

This commit is contained in:
2026-08-18 13:34:22 +08:00
parent 6e6dd60a88
commit 9dfa49602c
15 changed files with 176 additions and 62 deletions

View File

@@ -105,10 +105,10 @@ class ServerTest(unittest.TestCase):
def wait_for_job(self, context, timeout=2.0):
deadline = time.monotonic() + timeout
while time.monotonic() < deadline:
if context.snapshot()["state"] in {"succeeded", "failed", "cancelled"}:
return context.snapshot()
if context._snapshot()["state"] in {"succeeded", "failed", "cancelled"}:
return context._snapshot()
time.sleep(0.01)
self.fail(f"Job did not finish: {context.snapshot()}")
self.fail(f"Job did not finish: {context._snapshot()}")
def test_ben2_model_is_reused_for_matching_runtime_key(self):
loads = []
@@ -267,7 +267,7 @@ class ServerTest(unittest.TestCase):
server = self.create_server()
context = server.submit("remove-background", {}, job_id="job")
self.assertIsNotNone(server.cancel("job"))
self.assertTrue(context.is_cancelled())
self.assertTrue(context._is_cancelled())
status = self.wait_for_job(context)
self.assertEqual(status["state"], "cancelled")
@@ -291,8 +291,8 @@ class ServerTest(unittest.TestCase):
self.assertRegex(context.job_id, r"^[0-9a-f]{32}$")
self.assertEqual(context.directory.name, context.job_id)
self.assertEqual(context.snapshot()["state"], "succeeded")
self.assertEqual(context.snapshot()["progress"], 1.0)
self.assertEqual(context._snapshot()["state"], "succeeded")
self.assertEqual(context._snapshot()["progress"], 1.0)
def test_runtime_storage_root_owns_the_jobs_directory(self):
storage_root = self.storage_root
@@ -308,7 +308,7 @@ class ServerTest(unittest.TestCase):
self.assertEqual(server.jobs_directory, storage_root / "jobs")
self.assertEqual(context.storage_root, storage_root.resolve())
self.assertEqual(context.snapshot()["result"], {"value": 42})
self.assertEqual(context._snapshot()["result"], {"value": 42})
def test_job_server_owns_and_clears_shared_resources(self):
events = []