|
|
@@ -238,12 +238,15 @@ def main(argv = None): |
|
|
|
timestamp_to_seconds(total))) |
|
|
|
continue |
|
|
|
printf(" removing data before %s\n", timestamp_to_human(remove_before)) |
|
|
|
if args.yes: |
|
|
|
client.stream_remove(path, None, remove_before) |
|
|
|
for ap in streams[path].also_clean_paths: |
|
|
|
printf(" also removing from %s\n", ap) |
|
|
|
# Clean in reverse order. Since we only use the primary stream and not |
|
|
|
# the decimated streams to figure out which data to remove, removing |
|
|
|
# the primary stream last means that we might recover more nicely if |
|
|
|
# we are interrupted and restarted. |
|
|
|
clean_paths = list(reversed(streams[path].also_clean_paths)) + [ path ] |
|
|
|
for p in clean_paths: |
|
|
|
printf(" removing from %s\n", p) |
|
|
|
if args.yes: |
|
|
|
client.stream_remove(ap, None, remove_before) |
|
|
|
client.stream_remove(p, None, remove_before) |
|
|
|
|
|
|
|
# All done |
|
|
|
if not args.yes: |
|
|
|