diff options
author | Malfurious <m@lfurio.us> | 2023-10-26 08:46:09 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2023-10-26 20:41:40 -0400 |
commit | 47dbaf2c1d6329fdc814a107e0020b5b23e2d237 (patch) | |
tree | 3caedee08d291080112ad1962832adfe463a92f6 | |
parent | 618d4dac812c2d0ff46e4925cae4950f59bb02bf (diff) | |
download | cychedelic-47dbaf2c1d6329fdc814a107e0020b5b23e2d237.tar.gz cychedelic-47dbaf2c1d6329fdc814a107e0020b5b23e2d237.zip |
acid: Prune old build logs during startup maintenance
Signed-off-by: Malfurious <m@lfurio.us>
-rwxr-xr-x | acid/acid | 1 | ||||
-rw-r--r-- | acid/config.sh | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -92,6 +92,7 @@ sleep "$CYCHE_STARTUP_TIME" remove update --force docker system prune --force --all +find /logs -type f | sort -n | head -n "$((CYCHE_LOG_SIZE*-1))" | xargs rm -f starttime=$(now) # monitor source changes diff --git a/acid/config.sh b/acid/config.sh index ff44998..a25531e 100644 --- a/acid/config.sh +++ b/acid/config.sh @@ -10,6 +10,9 @@ CYCHE_JOB_TIME=10 # 10 seconds # Minimum time to wait on daemon startup CYCHE_STARTUP_TIME=60 # 1 minute +# Maximum number of latest build logs to retain during cleanup +CYCHE_LOG_SIZE=100 + # Master list of managed services CYCHE_SERVICES=( # <ref-pattern> should be a string suitable for `git for-each-ref`. Some |