Improve collab cleanup (#32000)
Co-authored-by: Max <max@zed.dev> Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Mikayla <mikayla@zed.dev> Release Notes: - N/A
This commit is contained in:
parent
81f8e2ed4a
commit
79b1dd7db8
2 changed files with 107 additions and 1 deletions
|
@ -433,6 +433,16 @@ impl Server {
|
|||
tracing::info!("waiting for cleanup timeout");
|
||||
timeout.await;
|
||||
tracing::info!("cleanup timeout expired, retrieving stale rooms");
|
||||
|
||||
app_state
|
||||
.db
|
||||
.delete_stale_channel_chat_participants(
|
||||
&app_state.config.zed_environment,
|
||||
server_id,
|
||||
)
|
||||
.await
|
||||
.trace_err();
|
||||
|
||||
if let Some((room_ids, channel_ids)) = app_state
|
||||
.db
|
||||
.stale_server_resource_ids(&app_state.config.zed_environment, server_id)
|
||||
|
@ -554,6 +564,21 @@ impl Server {
|
|||
}
|
||||
}
|
||||
|
||||
app_state
|
||||
.db
|
||||
.delete_stale_channel_chat_participants(
|
||||
&app_state.config.zed_environment,
|
||||
server_id,
|
||||
)
|
||||
.await
|
||||
.trace_err();
|
||||
|
||||
app_state
|
||||
.db
|
||||
.clear_old_worktree_entries(server_id)
|
||||
.await
|
||||
.trace_err();
|
||||
|
||||
app_state
|
||||
.db
|
||||
.delete_stale_servers(&app_state.config.zed_environment, server_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue