aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2024-01-15 23:28:56 -0800
committerDan Fandrich <danf@mageia.org>2024-01-15 23:28:56 -0800
commit59d57245110302809e6b77ee3c7cd99ebb7eeaf1 (patch)
tree64e09fbe46293a3d90bb844855754d2fae19663c /modules
parent1107246ed5e7252cd0cc0643e7c8cab63a9cd096 (diff)
downloadpuppet-59d57245110302809e6b77ee3c7cd99ebb7eeaf1.tar
puppet-59d57245110302809e6b77ee3c7cd99ebb7eeaf1.tar.gz
puppet-59d57245110302809e6b77ee3c7cd99ebb7eeaf1.tar.bz2
puppet-59d57245110302809e6b77ee3c7cd99ebb7eeaf1.tar.xz
puppet-59d57245110302809e6b77ee3c7cd99ebb7eeaf1.zip
Add a test cron job to see how it would clean up upload logs
The Puppet method for doing this seems to be what's causing its memory usage to reach the size of the physical RAM in the system and take up to 4 days to complete a Puppet run. The test will show the files being deleted and how long it takes, but won't actually delete them.
Diffstat (limited to 'modules')
-rw-r--r--modules/buildsystem/manifests/scheduler.pp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/buildsystem/manifests/scheduler.pp b/modules/buildsystem/manifests/scheduler.pp
index 47ac036e..9848f109 100644
--- a/modules/buildsystem/manifests/scheduler.pp
+++ b/modules/buildsystem/manifests/scheduler.pp
@@ -31,6 +31,14 @@ class buildsystem::scheduler {
age => $buildsystem::var::scheduler::clean_uploads_logs_age,
rmdirs => true,
}
+
+ cron { 'clean uploads logs':
+ user => $login,
+ # TEMPORARY to test what be deleted before replacing the above
+ command => sprintf("/usr/bin/find %s/uploads -xdev -type f -mtime +14 >/var/lib/schedbot/clean-uploads-logs-test.log", shellquote(${buildsystem::var::scheduler::homedir})),
+ hour => '*/4',
+ minute => '51',
+ }
}
if ($buildsystem::var::scheduler::clean_uploads_packages_age != '0') {
tidy { "${buildsystem::var::scheduler::homedir}/uploads/**/*.rpm":