[Piuparts-commits] [SCM] piatti.debian.org configuration files branch, piatti, updated. 0.42-15-gbd39fbc
Andreas Beckmann
debian at abeckmann.de
Sat Jan 7 11:44:24 UTC 2012
The following commit has been merged in the piatti branch:
commit abe2447fdee7b24a6605c2d28df173a4b2603d33
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Fri Jan 6 11:49:48 2012 +0100
allow overriding rescheduling settings per section
[<section>]
reschedule-old-days = ...
reschedule-old-count = ...
reschedule-fail-days = ...
reschedule-fail-count = ...
default to the values in the [global] section (which have defaults
in reschedule_oldest_logs)
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/home/piupartsm/bin/reschedule_oldest_logs b/home/piupartsm/bin/reschedule_oldest_logs
index 282f92a..9dbad02 100755
--- a/home/piupartsm/bin/reschedule_oldest_logs
+++ b/home/piupartsm/bin/reschedule_oldest_logs
@@ -53,10 +53,14 @@ OLDPWD=$(pwd)
for SECTION in $SECTIONS ; do
get_config_value RESCHEDULE $SECTION auto-reschedule yes
if [ "$RESCHEDULE" = "yes" ]; then
+ get_config_value _AGE $SECTION reschedule-old-days $AGE
+ get_config_value _COUNT $SECTION reschedule-old-count $COUNT
+ get_config_value _FAIL_AGE $SECTION reschedule-fail-days $FAIL_AGE
+ get_config_value _FAIL_COUNT $SECTION reschedule-fail-count $FAIL_COUNT
cd $MASTER/$SECTION
# we ignore bugged here - ptyhon-bts is really the way to go
- find pass fail -name "*.log" -mtime +$AGE | xargs --no-run-if-empty -n99999 -s999999 ls -dt | tail -n $COUNT > $LOGS
- find fail -name "*.log" -mtime +$FAIL_AGE | xargs --no-run-if-empty -n99999 -s999999 ls -dt | tail -n $FAIL_COUNT >> $LOGS
+ find pass fail -name "*.log" -mtime +$_AGE | xargs --no-run-if-empty -n99999 -s999999 ls -dt | tail -n $_COUNT > $LOGS
+ find fail -name "*.log" -mtime +$_FAIL_AGE | xargs --no-run-if-empty -n99999 -s999999 ls -dt | tail -n $_FAIL_COUNT >> $LOGS
if [ -s $LOGS ]; then
echo $SECTION
ls -dtl $(cat $LOGS)
--
piatti.debian.org configuration files
More information about the Piuparts-commits
mailing list