Reset workspace cleanup timer at diff view and IDE open (#1654)

* Add workspace.touch to reset cleanup timer at diff view and ide open

* Touch at ensure_container_exists, rm comments
This commit is contained in:
Alex Netsch
2026-01-06 11:00:48 +00:00
committed by GitHub
parent 3815936857
commit 0478ce06fc
4 changed files with 30 additions and 0 deletions

View File

@@ -245,6 +245,8 @@ pub async fn stream_task_attempt_diff_ws(
Extension(workspace): Extension<Workspace>,
State(deployment): State<DeploymentImpl>,
) -> impl IntoResponse {
let _ = Workspace::touch(&deployment.db().pool, workspace.id).await;
let stats_only = params.stats_only;
ws.on_upgrade(move |socket| async move {
if let Err(e) = handle_task_attempt_diff_ws(socket, deployment, workspace, stats_only).await
@@ -520,6 +522,9 @@ pub async fn open_task_attempt_in_editor(
.container()
.ensure_container_exists(&workspace)
.await?;
Workspace::touch(&deployment.db().pool, workspace.id).await?;
let workspace_path = Path::new(&container_ref);
// For single-repo projects, open from the repo directory