Skip to content

Commit 8219f87

Browse files
committed
Make raw deletion more thorough.
1 parent 1320a16 commit 8219f87

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
@@ -1767,16 +1767,16 @@ def clean_local_repo(self, exposure_ids: set[int]) -> None:
17671767
"""
17681768
with lsst.utils.timer.time_this(_log, msg="clean_local_repo", level=logging.DEBUG):
17691769
self.butler.registry.refresh()
1770-
if exposure_ids:
1771-
raws = self.butler.query_datasets(
1772-
'raw',
1773-
collections=self.instrument.makeDefaultRawIngestRunName(),
1774-
where=f"exposure in ({', '.join(str(x) for x in exposure_ids)})",
1775-
explain=False, # Raws might not have been ingested.
1776-
instrument=self.visit.instrument,
1777-
detector=self.visit.detector,
1778-
)
1779-
self.butler.pruneDatasets(raws, disassociate=True, unstore=True, purge=True)
1770+
# Clean out raws
1771+
raws = self.butler.query_datasets(
1772+
'raw',
1773+
collections=self.instrument.makeDefaultRawIngestRunName(),
1774+
explain=False, # Raws might not have been ingested.
1775+
instrument=self.visit.instrument,
1776+
detector=self.visit.detector,
1777+
)
1778+
self.butler.pruneDatasets(raws, disassociate=True, unstore=True, purge=True)
1779+
17801780
# Outputs are all in their own runs, so just drop them.
17811781
preload_run = runs.get_preload_run(self.instrument, self._deployment, self._day_obs)
17821782
_remove_run_completely(self.butler, preload_run)

0 commit comments

Comments
 (0)