forked from lix-project/hydra
Add a dependency_lookup configuration option to enable (slow) dependency lookup in queue. This behaviour was disabled temporarily in accefbb79
due to slowness in very large queues, but some people might be dependent on it, so it is configurable until the previous behaviour is implemented more efficiently.
This commit is contained in:
parent
cc1fcf657c
commit
24f5a6b15f
|
@ -19,6 +19,7 @@ my $lastTime;
|
||||||
|
|
||||||
#$SIG{CHLD} = 'IGNORE';
|
#$SIG{CHLD} = 'IGNORE';
|
||||||
|
|
||||||
|
my $config = getHydraConfig();
|
||||||
|
|
||||||
sub unlockDeadBuilds {
|
sub unlockDeadBuilds {
|
||||||
# Unlock builds whose building process has died.
|
# Unlock builds whose building process has died.
|
||||||
|
@ -48,7 +49,7 @@ sub unlockDeadBuilds {
|
||||||
# depends; or undef if no such build exists.
|
# depends; or undef if no such build exists.
|
||||||
sub findBuildDependencyInQueue {
|
sub findBuildDependencyInQueue {
|
||||||
my ($buildsByDrv, $build) = @_;
|
my ($buildsByDrv, $build) = @_;
|
||||||
return undef; # FIXME
|
return undef if !($config->{dependency_lookup} // 0); # FIXME
|
||||||
return undef unless isValidPath($build->drvpath);
|
return undef unless isValidPath($build->drvpath);
|
||||||
my @deps = grep { /\.drv$/ && $_ ne $build->drvpath } computeFSClosure(0, 0, $build->drvpath);
|
my @deps = grep { /\.drv$/ && $_ ne $build->drvpath } computeFSClosure(0, 0, $build->drvpath);
|
||||||
return unless scalar @deps > 0;
|
return unless scalar @deps > 0;
|
||||||
|
|
Loading…
Reference in a new issue