forked from lix-project/hydra
hydra: when restarting a build, remove possible failed dependencies from the failed-cache.
This commit is contained in:
parent
f7ce960b96
commit
c174998a0c
1 changed files with 5 additions and 1 deletions
|
@ -360,9 +360,13 @@ sub restart : Chained('build') PathPart Args(0) {
|
|||
requireProjectOwner($c, $build->project);
|
||||
|
||||
txn_do($c->model('DB')->schema, sub {
|
||||
my $drvpath = $build->drvpath ;
|
||||
error($c, "This build cannot be restarted.")
|
||||
unless $build->finished;
|
||||
unless $build->finished && -f $drvpath ;
|
||||
|
||||
my $cmd = "`nix-store -qR $drvpath`";
|
||||
my $r = `nix-store --clear-failed-paths $cmd`;
|
||||
|
||||
$build->update({finished => 0, timestamp => time});
|
||||
|
||||
$build->resultInfo->delete;
|
||||
|
|
Loading…
Reference in a new issue