@@ -1720,28 +1720,23 @@ def _query_datasets_by_storage_class(self, butler, exposure_ids, collections, st
1720
1720
) for t in matching_types
1721
1721
)
1722
1722
1723
- def clean_local_repo (self , exposure_ids : set [ int ] ) -> None :
1723
+ def clean_local_repo (self ) -> None :
1724
1724
"""Remove local repo content that is only needed for a single visit.
1725
1725
1726
1726
This includes raws and pipeline outputs.
1727
-
1728
- Parameter
1729
- ---------
1730
- exposure_ids : `set` [`int`]
1731
- Identifiers of the exposures to be removed.
1732
1727
"""
1733
1728
with lsst .utils .timer .time_this (_log , msg = "clean_local_repo" , level = logging .DEBUG ):
1734
1729
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
+
1745
1740
# Outputs are all in their own runs, so just drop them.
1746
1741
preload_run = runs .get_preload_run (self .instrument , self ._deployment , self ._day_obs )
1747
1742
_remove_run_completely (self .butler , preload_run )
0 commit comments