Remove timeline files on detach

This commit is contained in:
Kirill Bulatov
2022-04-28 00:49:03 +03:00
committed by Kirill Bulatov
parent 6cca57f95a
commit 2911eb084a
5 changed files with 35 additions and 9 deletions

View File

@@ -347,7 +347,8 @@ async fn timeline_detach_handler(request: Request<Body>) -> Result<Response<Body
let _enter =
info_span!("timeline_detach_handler", tenant = %tenant_id, timeline = %timeline_id)
.entered();
tenant_mgr::detach_timeline(tenant_id, timeline_id)
let state = get_state(&request);
tenant_mgr::detach_timeline(state.conf, tenant_id, timeline_id)
})
.await
.map_err(ApiError::from_err)??;