Skip to content

Commit

Permalink
print info if an object is preserved
Browse files Browse the repository at this point in the history
  • Loading branch information
Barthelemy committed Sep 3, 2024
1 parent bffb9d4 commit 6e2007d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Framework/script/RepoCleaner/qcrepocleaner/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 6e2007d

Please sign in to comment.