Skip to content

Commit f788cb2

Browse files
committed
Merge branch 'tickets/DM-43584'
2 parents e9aea84 + aded10c commit f788cb2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

python/activator/middleware_interface.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
# VALIDITY-HACK: local-only calib collections break if calibs are not requested
6565
# in chronological order. Turn off for large development runs.
6666
cache_calibs = bool(int(os.environ.get("DEBUG_CACHE_CALIBS", '1')))
67+
# TODO: workaround for DM-40193
68+
cache_anything = bool(int(os.environ.get("DEBUG_CACHE_INPUTS", '1')))
6769

6870

6971
def get_central_butler(central_repo: str, instrument_class: str):
@@ -1370,6 +1372,11 @@ def clean_local_repo(self, exposure_ids: set[int]) -> None:
13701372
self.butler.registry.removeCollection(member)
13711373
self.butler.removeRuns(calib_runs, unstore=True)
13721374

1375+
# TODO: workaround for DM-40193
1376+
if not cache_anything:
1377+
self.butler.pruneDatasets(self.butler.registry.queryDatasets(...),
1378+
disassociate=True, unstore=True, purge=True)
1379+
13731380

13741381
class _MissingDatasetError(RuntimeError):
13751382
"""An exception flagging that required datasets were not found

0 commit comments

Comments
 (0)