forked from lix-project/hydra
Clear nrSucceeded when restarting a build
This commit is contained in:
parent
d350b935f2
commit
896a47d950
|
@ -351,9 +351,9 @@ sub restart : Chained('build') PathPart Args(0) {
|
||||||
|
|
||||||
requireProjectOwner($c, $build->project);
|
requireProjectOwner($c, $build->project);
|
||||||
|
|
||||||
my $drvpath = $build->drvpath ;
|
my $drvpath = $build->drvpath;
|
||||||
error($c, "This build cannot be restarted.")
|
error($c, "This build cannot be restarted.")
|
||||||
unless $build->finished && -f $drvpath ;
|
unless $build->finished && -f $drvpath;
|
||||||
|
|
||||||
restartBuild($c->model('DB')->schema, $build);
|
restartBuild($c->model('DB')->schema, $build);
|
||||||
|
|
||||||
|
|
|
@ -968,5 +968,11 @@ sub restartBuild {
|
||||||
, busy => 0
|
, busy => 0
|
||||||
, locker => ""
|
, locker => ""
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# Reset the stats for the evals to which this build belongs.
|
||||||
|
# !!! Should do this in a trigger.
|
||||||
|
foreach my $m ($build->jobsetevalmembers->all) {
|
||||||
|
$m->eval->update({nrsucceeded => undef});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue