From d145729e9912728cda43ad006570325109db647f Mon Sep 17 00:00:00 2001 From: Wei Ouyang Date: Fri, 6 Dec 2024 09:22:06 -0800 Subject: [PATCH] Fix workspaces unload --- hypha/core/workspace.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hypha/core/workspace.py b/hypha/core/workspace.py index ebe1ffe6..e41e5485 100644 --- a/hypha/core/workspace.py +++ b/hypha/core/workspace.py @@ -1755,7 +1755,8 @@ async def unload(self, context=None): self.validate_context(context, permission=UserPermission.admin) ws = context["ws"] if not await self._redis.hexists("workspaces", ws): - raise KeyError(f"Workspace {ws} has already been unloaded.") + logger.warning(f"Workspace {ws} has already been unloaded.") + return winfo = await self.load_workspace_info(ws) # list all the clients in the workspace and send a meesage to delete them client_keys = await self._list_client_keys(winfo.id)