aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2024-01-23 18:27:16 -0800
committerDan Fandrich <danf@mageia.org>2024-01-23 18:30:27 -0800
commitfeaf6f2dd50357a7886e05b09a4b6299bde8eb8d (patch)
treedb453213e16a79e6d8ca7262d8d772fcabc24e99
parentc6352b1ceb8b001b16f956f8f56689dad536336d (diff)
downloadpuppet-feaf6f2dd50357a7886e05b09a4b6299bde8eb8d.tar
puppet-feaf6f2dd50357a7886e05b09a4b6299bde8eb8d.tar.gz
puppet-feaf6f2dd50357a7886e05b09a4b6299bde8eb8d.tar.bz2
puppet-feaf6f2dd50357a7886e05b09a4b6299bde8eb8d.tar.xz
puppet-feaf6f2dd50357a7886e05b09a4b6299bde8eb8d.zip
Make the schedbot cleaning jobs actually clean
The test jobs seem to be working as desired, so make them actually start deleting the old files every 4 hours. Use -ignore_readdir_race in all of them to avoid errors when schedbot cleans the files in the middle of a run (an unlikely situation because of the clean-up times involved).
-rw-r--r--modules/buildsystem/manifests/scheduler.pp12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/buildsystem/manifests/scheduler.pp b/modules/buildsystem/manifests/scheduler.pp
index 5218b646..7c186a19 100644
--- a/modules/buildsystem/manifests/scheduler.pp
+++ b/modules/buildsystem/manifests/scheduler.pp
@@ -28,8 +28,8 @@ class buildsystem::scheduler {
cron { 'clean uploads logs':
user => $login,
# Delete old upload logs
- command => sprintf("/usr/bin/find %s/uploads -xdev -depth -type f -ctime +%d >/var/lib/schedbot/clean-uploads-logs-test.log 2>&1", shellquote($homedir), shellquote($buildsystem::var::scheduler::clean_uploads_logs_age)),
- hour => '*/1',
+ command => sprintf("/usr/bin/find %s/uploads -ignore_readdir_race -xdev -depth -type f -ctime +%d -delete", shellquote($homedir), shellquote($buildsystem::var::scheduler::clean_uploads_logs_age)),
+ hour => '*/4',
minute => '51',
}
cron { 'clean uploads dirs':
@@ -40,8 +40,8 @@ class buildsystem::scheduler {
# every time a file/directory underneath it is deleted.
# Directories don't take much space, so this shouldn't be a
# real issue.
- command => sprintf("/usr/bin/find %s/uploads -ignore_readdir_race -mindepth 5 -xdev -depth -type d -ctime +%d -empty >/var/lib/schedbot/clean-uploads-dirs-test.log 2>&1", shellquote($homedir), shellquote($buildsystem::var::scheduler::clean_uploads_logs_age)),
- hour => '*/1',
+ command => sprintf("/usr/bin/find %s/uploads -ignore_readdir_race -mindepth 5 -xdev -depth -type d -ctime +%d -empty -delete", shellquote($homedir), shellquote($buildsystem::var::scheduler::clean_uploads_logs_age)),
+ hour => '*/4',
minute => '53',
}
}
@@ -49,8 +49,8 @@ class buildsystem::scheduler {
cron { 'clean uploads packages':
user => $login,
# Delete old upload RPMs
- command => sprintf("/usr/bin/find %s/uploads -xdev -depth -type f -name '*.rpm' -ctime +%d >/var/lib/schedbot/clean-uploads-packages-test.log 2>&1", shellquote($homedir), shellquote($buildsystem::var::scheduler::clean_uploads_packages_age)),
- hour => '*/1',
+ command => sprintf("/usr/bin/find %s/uploads -ignore_readdir_race -xdev -depth -type f -name '*.rpm' -ctime +%d -delete", shellquote($homedir), shellquote($buildsystem::var::scheduler::clean_uploads_packages_age)),
+ hour => '*/4',
minute => '52',
}
}