B:BD[
4.5127] → [
4.5127:5496]
∅:D[
3.40] → [
4.5536:5704]
B:BD[
4.5536] → [
4.5536:5704]
∅:D[
3.78] → [
4.5741:6171]
B:BD[
4.5741] → [
4.5741:6171]
B:BD[
4.6171] → [
2.519:641]
∅:D[
2.641] → [
4.6296:6304]
∅:D[
5.656] → [
4.6296:6304]
B:BD[
4.6296] → [
4.6296:6304]
let
# If there is less than ... GiB of free disk space, stop the queue
# to prevent builds from failing or aborting.
checkSpace = pkgs.writeScript "hydra-check-space"
''
#! /bin/sh
if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((${toString cfg.minimumDiskFree} * 1024**3)) ]; then
stop hydra_queue_runner
fi
if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((${toString cfg.minimumDiskFreeEvaluator} * 1024**3)) ]; then
stop hydra_evaluator
fi
'';
compressLogs = pkgs.writeScript "compress-logs" ''
#! /bin/sh -e
touch -d 'last month' r
find /nix/var/log/nix/drvs -type f -a ! -newer r -name '*.drv' | xargs bzip2 -v
'';
in
[ "*/5 * * * * root ${checkSpace} &> ${cfg.baseDir}/data/checkspace.log"
"15 5 * * * root ${compressLogs} &> ${cfg.baseDir}/data/compress.log"
"15 02 * * * ${cfg.user} ${env} ${cfg.hydra}/bin/hydra-update-gc-roots &> ${cfg.baseDir}/data/gc-roots.log"
];
let
# If there is less than ... GiB of free disk space, stop the queue
# to prevent builds from failing or aborting.
checkSpace = pkgs.writeScript "hydra-check-space"
''
#! /bin/sh
if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((${toString cfg.minimumDiskFree} * 1024**3)) ]; then
stop hydra_queue_runner
fi
if [ $(($(stat -f -c '%a' /nix/store) * $(stat -f -c '%S' /nix/store))) -lt $((${toString cfg.minimumDiskFreeEvaluator} * 1024**3)) ]; then
stop hydra_evaluator
fi
'';