Skip to content

Commit e3cf272

Browse files
committed
Make clean not create renders (WIP)
Signed-off-by: J Robert Ray <jrray@jrray.org>
1 parent 3ff2afd commit e3cf272

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

crates/spfs/src/clean.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,10 +723,11 @@ where
723723
async unsafe fn remove_unvisited_renders_and_proxies(&self) -> Result<CleanResult> {
724724
match self.repo {
725725
storage::RepositoryHandle::FSWithMaybeRenders(repo) => unsafe {
726-
// TODO: Convert this repo into one that will not create renders
726+
// Convert this repo into one that will not create renders
727727
// on demand. We only want to clean existing renders.
728+
let repo = repo.clone().without_render_creation();
728729

729-
self.remove_unvisited_renders_and_proxies_on_repo(repo)
730+
self.remove_unvisited_renders_and_proxies_on_repo(&repo)
730731
.await
731732
},
732733
storage::RepositoryHandle::FSWithRenders(repo) => unsafe {

crates/spfs/src/storage/fs/repository.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,15 @@ impl TryFrom<FsRepository<OpenFsRepositoryImpl<MaybeRenderStore>>>
439439
}
440440
}
441441

442+
impl FsRepository<MaybeOpenFsRepositoryImpl<MaybeRenderStore>> {
443+
/// Return a new instance of this repository with render store creation
444+
/// disabled. The render store will only be accessible if it already exists,
445+
/// but will not be created on demand.
446+
pub fn without_render_creation(self) -> Self {
447+
todo!()
448+
}
449+
}
450+
442451
#[async_trait::async_trait]
443452
impl<FS> FsRepositoryOps for FsRepository<FS>
444453
where

0 commit comments

Comments
 (0)