Skip to content

Commit 5dbd9e0

Browse files
committed
fix: improve workspace dormancy messages and clean up router logging
- Updated the print statement in CoderAPI to clarify that the workspace was previously dormant before changing its state. - Removed the print statement in the workspace router when starting a workspace to reduce console clutter.
1 parent 3b0ec22 commit 5dbd9e0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/backend/coder.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,8 @@ def start_workspace(self, workspace_id):
190190

191191
# First check if the workspace is dormant
192192
if self.is_workspace_dormant(workspace_id):
193-
print("Workspace is dormant, setting to not dormant")
193+
print("Workspace was dormant, setting to not dormant")
194194
self.set_workspace_dormancy(workspace_id, False)
195-
else:
196-
print("Workspace is not dormant")
197195

198196
# First get the workspace to get its template version
199197
workspace_endpoint = f"{self.coder_url}/api/v2/workspaces/{workspace_id}"
@@ -306,6 +304,7 @@ def set_workspace_dormancy(self, workspace_id, dormant: bool):
306304
Set a workspace to be dormant or not
307305
"""
308306
endpoint = f"{self.coder_url}/api/v2/workspaces/{workspace_id}/dormant"
307+
309308
data = {"dormant": dormant}
310309
headers = self.headers.copy()
311310
headers['Content-Type'] = 'application/json'

src/backend/routers/workspace_router.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ async def start_workspace(
6969

7070
try:
7171
response = coder_api.start_workspace(workspace.id)
72-
print(response)
7372
return JSONResponse(content=response)
7473
except Exception as e:
7574
print(f"Error starting workspace: {str(e)}")

0 commit comments

Comments
 (0)