Missing part of aaacf9eda3
This commit is contained in:
@ -339,9 +339,17 @@ sub getEvals {
|
||||
my $cur = $evals[$n];
|
||||
|
||||
# Get stats for this eval.
|
||||
my $nrBuilds = $cur->jobsetevalmembers->count;
|
||||
my $nrScheduled = $cur->builds->search({finished => 0})->count;
|
||||
my $nrSucceeded = $cur->builds->search({finished => 1, buildStatus => 0})->count;
|
||||
my $nrScheduled;
|
||||
my $nrSucceeded = $cur->nrsucceeded;
|
||||
if (defined $nrSucceeded) {
|
||||
$nrScheduled = 0;
|
||||
} else {
|
||||
$nrScheduled = $cur->builds->search({finished => 0})->count;
|
||||
$nrSucceeded = $cur->builds->search({finished => 1, buildStatus => 0})->count;
|
||||
if ($nrScheduled == 0) {
|
||||
$cur->update({nrsucceeded => $nrSucceeded});
|
||||
}
|
||||
}
|
||||
|
||||
# Compute what inputs changed between each eval.
|
||||
my $curInputs = [ $cur->jobsetevalinputs->search(
|
||||
@ -359,10 +367,9 @@ sub getEvals {
|
||||
|
||||
my $e =
|
||||
{ eval => $cur
|
||||
, nrBuilds => $nrBuilds
|
||||
, nrScheduled => $nrScheduled
|
||||
, nrSucceeded => $nrSucceeded
|
||||
, nrFailed => $nrBuilds - $nrSucceeded - $nrScheduled
|
||||
, nrFailed => $cur->nrbuilds - $nrSucceeded - $nrScheduled
|
||||
, diff => defined $prev ? $nrSucceeded - $prev->{nrSucceeded} : 0
|
||||
, changedInputs => [ @changedInputs ]
|
||||
};
|
||||
|
@ -66,6 +66,16 @@ __PACKAGE__->table("JobsetEvals");
|
||||
data_type: 'text'
|
||||
is_nullable: 0
|
||||
|
||||
=head2 nrbuilds
|
||||
|
||||
data_type: 'integer'
|
||||
is_nullable: 1
|
||||
|
||||
=head2 nrsucceeded
|
||||
|
||||
data_type: 'integer'
|
||||
is_nullable: 1
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
@ -85,6 +95,10 @@ __PACKAGE__->add_columns(
|
||||
{ data_type => "integer", is_nullable => 0 },
|
||||
"hash",
|
||||
{ data_type => "text", is_nullable => 0 },
|
||||
"nrbuilds",
|
||||
{ data_type => "integer", is_nullable => 1 },
|
||||
"nrsucceeded",
|
||||
{ data_type => "integer", is_nullable => 1 },
|
||||
);
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
@ -157,8 +171,8 @@ Related object: L<Hydra::Schema::Projects>
|
||||
__PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" }, {});
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-04-15 16:38:10
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Yt39QbkhH52hfpJZ4ZECeg
|
||||
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-04-15 22:30:41
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jn81MbsAb5KZGwRpQ7qTEQ
|
||||
|
||||
__PACKAGE__->has_many(
|
||||
"buildIds",
|
||||
|
Reference in New Issue
Block a user