forked from lix-project/hydra
* Get the job priority from the meta.schedulingPriority attribute.
Can't use meta.priority because nix-env already uses that one for resolving filename clashes.
This commit is contained in:
parent
21497f9a47
commit
5f7142eb82
|
@ -198,6 +198,13 @@ sub checkJob {
|
|||
die unless $job->{drvPath} eq $drvPath;
|
||||
my $outPath = $job->{outPath};
|
||||
|
||||
my $priority = 100;
|
||||
if (defined $job->{meta}->{schedulingPriority} &&
|
||||
$job->{meta}->{schedulingPriority}->{value} =~ /^\d+$/)
|
||||
{
|
||||
$priority = int($job->{meta}->{schedulingPriority}->{value});
|
||||
}
|
||||
|
||||
$db->txn_do(sub {
|
||||
if (scalar($db->resultset('Builds')->search(
|
||||
{ project => $project->name, jobset => $jobset->name
|
||||
|
@ -224,7 +231,7 @@ sub checkJob {
|
|||
|
||||
$db->resultset('Buildschedulinginfo')->create(
|
||||
{ id => $build->id
|
||||
, priority => 0
|
||||
, priority => $priority
|
||||
, busy => 0
|
||||
, locker => ""
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue