#61 leave symlinks for longer time
Merged 2 years ago by tkopecek. Opened 2 years ago by tkopecek.
tkopecek/koji-tools update-work-cleanup  into  master

file modified
+9 -2
@@ -3,10 +3,17 @@ 

  # remove old stuff under kojiroot/work

  

  TOPDIR=/mnt/koji

- TIMEARG="-mtime +2"

+ TIMEARG="-mtime +7"

+ # final removal date should be in line with koji-prune-scratch

+ TIMEARG_FINAL="-mtime +21"

  

- # for tasks, try to remove as a unit

+ # for tasks, remove old stuff which is not symlink in shorter time

  for x in $(find "$TOPDIR"/work/tasks/ -mindepth 2 -maxdepth 2 -type d $TIMEARG); do

+     find "$x" -xdev '!' -type d '!' -type l -print0 | xargs -0 -r rm -f

+ done

+ 

+ # for tasks, try to remove as a unit on final date

+ for x in $(find "$TOPDIR"/work/tasks/ -mindepth 2 -maxdepth 2 -type d $TIMEARG_FINAL); do

      find "$x" -xdev '!' -type d -print0 | xargs -0 -r rm -f

      find "$x" -xdev -depth -type d -print0 | xargs -0 -r rmdir

  done

no initial comment

Commit 2b8a094 fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago

Pull-Request has been merged by tkopecek

2 years ago
Metadata