Skip to content

Commit

Permalink
Use configured compression in hydra-compress-logs service, drop mtime
Browse files Browse the repository at this point in the history
When the service would fail for longer than 3 hours (very likely), then
old logs would never be compressed
  • Loading branch information
SuperSandro2000 committed Aug 8, 2024
1 parent 88eba2a commit b47d3f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nixos-modules/hydra.nix
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@ in
{ path = [ pkgs.bzip2 ];
script =
''
find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f
set -eou pipefail
compression=$(sed -nr 's/compress_build_logs_compression = ()/\1/p' ${baseDir}/hydra.conf)
find ${baseDir}/build-logs -type f -name "*.drv" -size +0c | xargs -r $compression -v -f
'';
startAt = "Sun 01:45";
};
Expand Down

0 comments on commit b47d3f1

Please sign in to comment.