mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-11-27 17:00:37 +00:00
fix(benchmark): pass OpenSandbox instance to _invalidate_sandbox (#8561)
Follow-up to #8507 (`6cefec0c9`), which changed `OpenSandboxProvider._invalidate_sandbox` to accept an `OpenSandboxSandbox` instance instead of `sandbox_id: str`. Look up the active or warm sandbox instance under `self._lock` inside `BenchmarkOpenSandboxProvider.destroy()` before calling `_invalidate_sandbox()`.
This commit is contained in:
parent
178edb4721
commit
ec189ccd2b
@ -320,7 +320,13 @@ def _make_opensandbox_provider(config: dict[str, Any]) -> tuple[Any, dict[str, A
|
||||
# The runner calls this after release. Reuse the provider's owner of
|
||||
# identity removal instead of separately editing its three maps.
|
||||
with self._acquire_serializer.hold(sandbox_id):
|
||||
self._invalidate_sandbox(sandbox_id, reason="benchmark_no_warmpool")
|
||||
with self._lock:
|
||||
sandbox = self._sandboxes.get(sandbox_id)
|
||||
if sandbox is None:
|
||||
warm_entry = self._warm_pool.get(sandbox_id)
|
||||
sandbox = warm_entry[0] if warm_entry is not None else None
|
||||
if sandbox is not None:
|
||||
self._invalidate_sandbox(sandbox, reason="benchmark_no_warmpool")
|
||||
self._check_cleanup()
|
||||
|
||||
def shutdown(self) -> None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user