mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
Build hook: Pass the timeout to the remote builder
Note that this will only work if the client has a very recent Nix
version (post 15e1b2c223
), otherwise the
--option flag will just be ignored.
Fixes #50.
This commit is contained in:
parent
4ba47205c6
commit
479e9172b3
2 changed files with 5 additions and 4 deletions
|
@ -46,8 +46,7 @@ sub all { $_ || return 0 for @_; 1 }
|
|||
# Initialisation.
|
||||
my $loadIncreased = 0;
|
||||
|
||||
my ($localSystem, $maxSilentTime, $printBuildTrace) = @ARGV;
|
||||
$maxSilentTime = 0 unless defined $maxSilentTime;
|
||||
my ($localSystem, $maxSilentTime, $printBuildTrace, $buildTimeout) = @ARGV;
|
||||
|
||||
my $currentLoad = $ENV{"NIX_CURRENT_LOAD"};
|
||||
my $conf = $ENV{"NIX_REMOTE_SYSTEMS"};
|
||||
|
@ -258,7 +257,9 @@ close UPLOADLOCK;
|
|||
|
||||
|
||||
# Perform the build.
|
||||
my $buildFlags = "--max-silent-time $maxSilentTime --fallback --add-root $rootsDir/\$PPID.out --option verbosity 0";
|
||||
my $buildFlags =
|
||||
"--max-silent-time $maxSilentTime --option build-timeout $buildTimeout "
|
||||
. "--fallback --add-root $rootsDir/\$PPID.out --option verbosity 0";
|
||||
|
||||
# We let the remote side kill its process group when the connection is
|
||||
# closed unexpectedly. This is necessary to ensure that no processes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue