mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
fix: delete broken sandbox before creating replacement to prevent orphan accumulation
This commit is contained in:
parent
facfb1f7e7
commit
9396ee9c85
1 changed files with 4 additions and 0 deletions
|
|
@ -126,6 +126,10 @@ def _find_or_create(thread_id: str) -> tuple[_TimeoutAwareSandbox, bool]:
|
|||
sandbox.id,
|
||||
sandbox.state,
|
||||
)
|
||||
try:
|
||||
client.delete(sandbox)
|
||||
except Exception:
|
||||
logger.debug("Could not delete broken sandbox %s", sandbox.id, exc_info=True)
|
||||
sandbox = client.create(_sandbox_create_params(labels))
|
||||
is_new = True
|
||||
logger.info("Created replacement sandbox: %s", sandbox.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue