@@ -1720,28 +1720,23 @@ def _query_datasets_by_storage_class(self, butler, exposure_ids, collections, st
17201720 ) for t in matching_types
17211721 )
17221722
1723- def clean_local_repo (self , exposure_ids : set [ int ] ) -> None :
1723+ def clean_local_repo (self ) -> None :
17241724 """Remove local repo content that is only needed for a single visit.
17251725
17261726 This includes raws and pipeline outputs.
1727-
1728- Parameter
1729- ---------
1730- exposure_ids : `set` [`int`]
1731- Identifiers of the exposures to be removed.
17321727 """
17331728 with lsst .utils .timer .time_this (_log , msg = "clean_local_repo" , level = logging .DEBUG ):
17341729 self .butler .registry .refresh ()
1735- if exposure_ids :
1736- raws = self .butler .query_datasets (
1737- 'raw' ,
1738- collections = self .instrument .makeDefaultRawIngestRunName (),
1739- where = f"exposure in ( { ', ' . join ( str ( x ) for x in exposure_ids ) } )" ,
1740- explain = False , # Raws might not have been ingested.
1741- instrument = self .visit .instrument ,
1742- detector = self . visit . detector ,
1743- )
1744- self . butler . pruneDatasets ( raws , disassociate = True , unstore = True , purge = True )
1730+ # Clean out raws
1731+ raws = self .butler .query_datasets (
1732+ 'raw' ,
1733+ collections = self .instrument .makeDefaultRawIngestRunName (),
1734+ explain = False , # Raws might not have been ingested.
1735+ instrument = self . visit . instrument ,
1736+ detector = self .visit .detector ,
1737+ )
1738+ self . butler . pruneDatasets ( raws , disassociate = True , unstore = True , purge = True )
1739+
17451740 # Outputs are all in their own runs, so just drop them.
17461741 preload_run = runs .get_preload_run (self .instrument , self ._deployment , self ._day_obs )
17471742 _remove_run_completely (self .butler , preload_run )
0 commit comments