diff --git a/Framework/script/RepoCleaner/qcrepocleaner/config.yaml b/Framework/script/RepoCleaner/qcrepocleaner/config.yaml index c2741ad1dd..9540efa651 100644 --- a/Framework/script/RepoCleaner/qcrepocleaner/config.yaml +++ b/Framework/script/RepoCleaner/qcrepocleaner/config.yaml @@ -12,6 +12,10 @@ Rules: delay: 1 policy: multiple_per_run mw_deletion_delay: 15 + - object_path: qc/TST/MO/QcTask + delay: 1440 + policy: multiple_per_run + mw_deletion_delay: 15 # - object_path: qc/TST/MO/QcTask-barth/example3[/.*]{0,1} # delay: 0 # policy: none_kept diff --git a/Framework/script/RepoCleaner/qcrepocleaner/rules/multiple_per_run.py b/Framework/script/RepoCleaner/qcrepocleaner/rules/multiple_per_run.py index 760a9baa16..55f75f5c05 100644 --- a/Framework/script/RepoCleaner/qcrepocleaner/rules/multiple_per_run.py +++ b/Framework/script/RepoCleaner/qcrepocleaner/rules/multiple_per_run.py @@ -109,10 +109,13 @@ def process(ccdb: Ccdb, object_path: str, delay: int, from_timestamp: int, to_t elif first_object.createdAtDt < datetime.now() - timedelta(minutes=mw_deletion_delay): logger.debug(f" after mw_deletion_delay period, delete this bucket") for v in run_versions: - logger.debug(f"process {v}") if "mw" in v.path: # this is because we really don't want to take the risk of batch deleting non moving windows + logger.debug(f" deleting {v}") deletion_list.append(v) ccdb.deleteVersion(v) + else: + logger.debug(f" deletion is aborted as path does not contain `mw` ({v})") + preservation_list.append(v) else: logger.debug(f" not in the grace period")