Skip to content

Commit bfb8790

Browse files
committed
Make raw deletion more thorough.
1 parent 6020eb6 commit bfb8790

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

python/activator/middleware_interface.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,16 +1732,16 @@ def clean_local_repo(self, exposure_ids: set[int]) -> None:
17321732
"""
17331733
with lsst.utils.timer.time_this(_log, msg="clean_local_repo", level=logging.DEBUG):
17341734
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)
1735+
# Clean out raws
1736+
raws = self.butler.query_datasets(
1737+
'raw',
1738+
collections=self.instrument.makeDefaultRawIngestRunName(),
1739+
explain=False, # Raws might not have been ingested.
1740+
instrument=self.visit.instrument,
1741+
detector=self.visit.detector,
1742+
)
1743+
self.butler.pruneDatasets(raws, disassociate=True, unstore=True, purge=True)
1744+
17451745
# Outputs are all in their own runs, so just drop them.
17461746
preload_run = runs.get_preload_run(self.instrument, self._deployment, self._day_obs)
17471747
_remove_run_completely(self.butler, preload_run)

0 commit comments

Comments
 (0)