Skip to content

Commit

Permalink
Fix removing workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Dec 18, 2024
1 parent 039059c commit 0710007
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hypha/VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.20.44.post4"
"version": "0.20.44.post5"
}
2 changes: 1 addition & 1 deletion hypha/core/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ async def housekeeping(self):
f"Removed {len(summary['removed_clients'])} clients from workspace {workspace.id}"
)
except Exception as e:
logger.exception(f"Error in housekeeping {workspace}: {e}")
logger.exception(f"Error in housekeeping {workspace.id}: {e}")

async def upgrade(self):
"""Upgrade the store."""
Expand Down
3 changes: 2 additions & 1 deletion hypha/core/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -1890,9 +1890,10 @@ async def cleanup(
# list all the clients and ping them
# If they are not responding, delete them
client_keys = await self._list_client_keys(workspace)
if len(client_keys) <= 0:
if len(client_keys) <= 0 and not workspace_info.persistent:
await self.delete_workspace(workspace_info.id, context=context)
return {"removed_workspace": workspace_info.id, "removed_clients": []}

removed = []
summary = {}
if not workspace_info.persistent:
Expand Down

0 comments on commit 0710007

Please sign in to comment.